<!DOCTYPE html><html class="theme-next muse use-motion" lang="zh-CN"><head><meta name="generator" content="Hexo 3.8.0"><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=2"><meta name="theme-color" content="#222"><script src="//fastly.jsdelivr.net/npm/pace-js@1.0.2/pace.min.js"></script><link href="/lib/pace/pace-theme-corner-indicator.min.css?v=1.0.2" rel="stylesheet"><meta name="google-site-verification" content="sDeZZSmv4NPbU3sXi1IL5l8PiZt1wVqR5EKUsxOjruY"><link href="https://fastly.jsdelivr.net/npm/@fancyapps/fancybox@3.2.5/dist/jquery.fancybox.min.css" rel="stylesheet" type="text/css"><link href="https://fonts.geekzu.org/css?family=Noto Serif SC:300,300italic,400,400italic,700,700italic|Noto Serif SC:300,300italic,400,400italic,700,700italic|Roboto Mono:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css"><link href="//fastly.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"><link href="/css/main.css?v=6.6.0" rel="stylesheet" type="text/css"><link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=6.6.0"><link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=6.6.0"><link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=6.6.0"><link rel="mask-icon" href="/images/logo.svg?v=6.6.0" color="#222"><script id="hexo.configurations">var NexT=window.NexT||{},CONFIG={root:"/",scheme:"Muse",version:"6.6.0",sidebar:{position:"left",display:"hide",offset:12,b2t:!1,scrollpercent:!0,onmobile:!0},fancybox:!0,fastclick:!1,lazyload:!1,tabs:!0,motion:{enable:!0,async:!1,transition:{post_block:"fadeIn",post_header:"slideDownIn",post_body:"slideDownIn",coll_header:"slideLeftIn",sidebar:"slideUpIn"}},algolia:{applicationID:"",apiKey:"",indexName:"",hits:{per_page:10},labels:{input_placeholder:"Search for Posts",hits_empty:"We didn't find any results for the search: ${query}",hits_stats:"${hits} results found in ${time} ms"}}}</script><meta name="description" content="由于是转载文章，文章中的我特指作者：SukkaW随着 OpenCore 日渐成熟、acidanthera 团队宣布放弃旗下绝大部分内核驱动（包括 Lilu、VirtualSMC、WhateverGreen、AppleALC 等）对 Clover 的兼容性支持，与其届时被迫换到 OpenCore，不如主动开始迁移。"><meta name="keywords" content="教程,OpenCore,Clover,OC-little,bootloader"><meta property="og:type" content="article"><meta property="og:title" content="【转载】从Clover到OpenCore"><meta property="og:url" content="https://blog.daliansky.net/From-Clover-To-OpenCore.html"><meta property="og:site_name" content="黑果小兵的部落阁"><meta property="og:description" content="由于是转载文章，文章中的我特指作者：SukkaW随着 OpenCore 日渐成熟、acidanthera 团队宣布放弃旗下绝大部分内核驱动（包括 Lilu、VirtualSMC、WhateverGreen、AppleALC 等）对 Clover 的兼容性支持，与其届时被迫换到 OpenCore，不如主动开始迁移。"><meta property="og:locale" content="zh-CN"><meta property="og:image" content="https://pan2.daliansky.net/d/blog2/OpenCore/from-clover-to-opencore.png"><meta property="og:updated_time" content="2022-11-10T06:07:00.963Z"><meta name="twitter:card" content="summary"><meta name="twitter:title" content="【转载】从Clover到OpenCore"><meta name="twitter:description" content="由于是转载文章，文章中的我特指作者：SukkaW随着 OpenCore 日渐成熟、acidanthera 团队宣布放弃旗下绝大部分内核驱动（包括 Lilu、VirtualSMC、WhateverGreen、AppleALC 等）对 Clover 的兼容性支持，与其届时被迫换到 OpenCore，不如主动开始迁移。"><meta name="twitter:image" content="https://pan2.daliansky.net/d/blog2/OpenCore/from-clover-to-opencore.png"><link rel="alternate" href="/atom.xml" title="黑果小兵的部落阁" type="application/atom+xml"><link rel="canonical" href="https://blog.daliansky.net/From-Clover-To-OpenCore.html"><script id="page.configurations">CONFIG.page={sidebar:""}</script><title>【转载】从Clover到OpenCore | 黑果小兵的部落阁</title><noscript><style>.sidebar-inner,.use-motion .brand,.use-motion .collection-title,.use-motion .comments,.use-motion .menu-item,.use-motion .motion-element,.use-motion .pagination,.use-motion .post-block,.use-motion .post-body,.use-motion .post-header{opacity:initial}.use-motion .logo,.use-motion .site-subtitle,.use-motion .site-title{opacity:initial;top:initial}.use-motion .logo-line-before i{left:initial}.use-motion .logo-line-after i{right:initial}</style></noscript></head><body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN"><div class="container sidebar-position-left page-post-detail"><div class="headband"></div><header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader"><div class="header-inner"><div class="site-brand-wrapper"><div class="site-meta"><div class="custom-logo-site-title"><a href="/" class="brand" rel="start"><span class="logo-line-before"><i></i></span> <span class="site-title">黑果小兵的部落阁</span> <span class="logo-line-after"><i></i></span></a></div><p class="site-subtitle">Hackintosh安装镜像、教程及经验分享</p></div><div class="site-nav-toggle"><button aria-label="切换导航栏"><span class="btn-bar"></span> <span class="btn-bar"></span> <span class="btn-bar"></span></button></div></div><nav class="site-nav"><ul id="menu" class="menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="menu-item-icon fa fa-fw fa-home"></i><br>首页</a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="menu-item-icon fa fa-fw fa-archive"></i><br>归档</a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="menu-item-icon fa fa-fw fa-th"></i><br>分类</a></li><li class="menu-item menu-item-tags"><a href="/tags/" rel="section"><i class="menu-item-icon fa fa-fw fa-tags"></i><br>标签</a></li><li class="menu-item menu-item-about"><a href="/about/" rel="section"><i class="menu-item-icon fa fa-fw fa-user"></i><br>关于</a></li><li class="menu-item menu-item-search"><a href="javascript:;" class="popup-trigger"><i class="menu-item-icon fa fa-search fa-fw"></i><br>搜索</a></li></ul><div class="site-search"><div class="popup search-popup local-search-popup"><div class="local-search-header clearfix"><span class="search-icon"><i class="fa fa-search"></i> </span><span class="popup-btn-close"><i class="fa fa-times-circle"></i></span><div class="local-search-input-wrapper"><input autocomplete="off" placeholder="搜索..." spellcheck="false" type="text" id="local-search-input"></div></div><div id="local-search-result"></div></div></div></nav></div></header><a href="https://github.com/daliansky" class="github-corner" title="Follow me on GitHub" aria-label="Follow me on GitHub" rel="noopener" target="_blank"><svg width="80" height="80" viewbox="0 0 250 250" style="fill:#222;color:#fff;position:absolute;top:0;border:0;right:0" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"/><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin:130px 106px" class="octo-arm"/><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"/></svg></a><main id="main" class="main"><div class="main-inner"><div class="content-wrap"><div id="content" class="content"><div id="posts" class="posts-expand"><div class="reading-progress-bar"></div><article class="post post-type-normal" itemscope itemtype="http://schema.org/Article"><div class="post-block"><link itemprop="mainEntityOfPage" href="https://blog.daliansky.net/From-Clover-To-OpenCore.html"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="name" content="黑果小兵"><meta itemprop="description" content="黑果小兵,daliansky,blog.daliansky.net,macOS,Hackintosh,黑苹果,linux"><meta itemprop="image" content="/images/avatar.png"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="黑果小兵的部落阁"></span><header class="post-header"><h1 class="post-title" itemprop="name headline">【转载】从Clover到OpenCore</h1><div class="post-meta"><span class="post-time"><span class="post-meta-item-icon"><i class="fa fa-calendar-o"></i> </span><time title="创建时间：2020-04-14 10:33:04" itemprop="dateCreated datePublished" datetime="2020-04-14T10:33:04+08:00">2020-04-14</time> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"><i class="fa fa-calendar-check-o"></i> </span><time title="修改时间：2022-11-10 14:07:00" itemprop="dateModified" datetime="2022-11-10T14:07:00+08:00">2022-11-10</time> </span><span class="post-category"><span class="post-meta-divider">|</span> <span class="post-meta-item-icon"><i class="fa fa-folder-o"></i> </span><span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/教程/" itemprop="url" rel="index"><span itemprop="name">教程</span></a></span> </span><span class="post-meta-divider">|</span> <span class="post-meta-item-icon" title="阅读次数"><i class="fa fa-eye"></i> <span class="busuanzi-value" id="busuanzi_value_page_pv"></span></span><div class="post-symbolscount"><span class="post-meta-item-icon"><i class="fa fa-file-word-o"></i> </span><span title="本文字数">21k</span> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"><i class="fa fa-clock-o"></i> </span><span title="阅读时长">38 分钟</span></div></div></header><div class="post-body" itemprop="articleBody"><div class="post-gallery" itemscope itemtype="http://schema.org/ImageGallery"><div class="post-gallery-row"><a class="post-gallery-img fancybox" href="https://pan2.daliansky.net/d/blog2/OpenCore/from-clover-to-opencore.png" rel="gallery_claao4lga002vyfcqt3qcoiay" itemscope itemtype="http://schema.org/ImageObject" itemprop="url"><img src="https://pan2.daliansky.net/d/blog2/OpenCore/from-clover-to-opencore.png" itemprop="contentUrl"></a></div></div><div><div><div class="post-gallery"></div></div></div><blockquote><p>由于是转载文章，文章中的<code>我</code>特指作者：<a href="https://github.com/SukkaW" target="_blank" rel="noopener">SukkaW</a></p></blockquote><p>随着 <code>OpenCore</code> 日渐成熟、<a href="https://github.com/acidanthera" target="_blank" rel="noopener">acidanthera</a> 团队宣布放弃旗下绝大部分内核驱动（包括 <a href="https://github.com/acidanthera/Lilu" target="_blank" rel="noopener">Lilu</a>、<a href="https://github.com/acidanthera/VirtualSMC" target="_blank" rel="noopener">VirtualSMC</a>、<a href="https://github.com/acidanthera/WhateverGreen" target="_blank" rel="noopener">WhateverGreen</a>、<a href="https://github.com/acidanthera/AppleALC" target="_blank" rel="noopener">AppleALC</a> 等）对 <code>Clover</code> 的兼容性支持，与其届时被迫换到 <code>OpenCore</code>，不如主动开始迁移。</p><a id="more"></a><p>当然面对迁移，有的人会选择直接抛弃之前 <code>Clover</code> 的全部成果，直接从零开始配置 <code>OpenCore</code>。但是我相信对于大部分人来说更希望通过简简单单的修补，在现有的 EFI 的基础上迁移到 <code>OpenCore</code>，因此我开始撰写这篇文章。</p><p>然而不幸的是从 <code>Clover</code> 切换到 <code>OpenCore</code> 并不是一个简单的任务，因此这种迁移应该是渐进式的，不可能一蹴而就。那什么是「渐进式」呢？意思就是，如果你按照本文的步骤一步一步按顺序进行，那么大部分迁移步骤产生的修改，在 <code>Clover</code> 下一样可用，你不需要一下子就扔掉 <code>Clover</code> 。</p><h2 id="序言以外应该写在最前面的话"><a class="markdownIt-Anchor" href="#序言以外应该写在最前面的话"></a> 序言以外应该写在最前面的话</h2><ol><li><code>OpenCore</code> 丢掉了不少 <code>Clover</code> 的历史包袱。毫无疑问依然有不少 <code>Clover</code> 设置在 <code>OpenCore</code> 是没有可以直接替代的。因此 <code>Clover</code> 完全照搬到 <code>OpenCore</code> 是肯定行不通的。</li><li>在迁移到 <code>OpenCore</code> 之前，Clover 的大部分设置都要精简：用 <code>SSDT</code> 代替、改为注入设备属性（Device Properties）。这篇教程的主题就是教你这些事情。</li><li>如果你一开始在组织 <code>Clover</code> 的 EFI 时就有洁癖的话，你会发现迁移到 <code>OpenCore</code> 出人意料地简单。</li><li>只有完美的 <code>Clover</code> 的 EFI，在按照本文档的步骤精简后能获得完美的 <code>OpenCore</code> 的 EFI。如果你的 EFI 是不完美的，那么迁移到 <code>OpenCore</code> 也一定是不完美的。因此，如果你是为了解决不完美、才想迁移到 <code>OpenCore</code>，那么我建议先在 <code>Clover</code> 下完善。</li><li>独木难成林。这篇教程初次发布以后，<a href="https://github.com/williambj1" target="_blank" rel="noopener">Bat.bat</a> 等许多大佬在远景论坛、Telegram 上提供了许多意见，正是在他们的帮助下，这篇教程得以不断完善。</li></ol><h2 id="修改-ssdt-dsdt-以搭配-opencore"><a class="markdownIt-Anchor" href="#修改-ssdt-dsdt-以搭配-opencore"></a> 修改 <code>SSDT</code> / <code>DSDT</code> 以搭配 <code>OpenCore</code></h2><p><code>OpenCore</code> 和 <code>Clover</code> 最大的不同其实是，<a href="https://github.com/acidanthera" target="_blank" rel="noopener">acidanthera</a> 决定在 <code>OpenCore</code> 中设置的 SMBIOS 机型信息、DSDT 和 SSDT，都将一视同仁的对所有操作系统生效。这样做的目的是让黑苹果更像白苹果，但是却有可能导致在 macOS 上正常可用的 ACPI 表到了 Windows 上反而会出问题。因此，迁移的第一步我个人推荐从修改现有的 <code>SSDT</code> 和 <code>DSDT</code> 开始，因为在 <code>OpenCore</code> 下能用的 SSDT、DSDT，在 <code>Clover</code> 下是一定可用的。也就是说，当你完成这一步后，你可以继续使用 <code>Clover</code> 而不受影响。</p><p>这里主要介绍对 <code>Method</code> 函数的修改方法。以 GPRW（6D0D）补丁为例，在 <code>Clover</code> 上我们一般采用这种方法：</p><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">//</span></span><br><span class="line"><span class="comment">// In config ACPI, GPRW to XPRW</span></span><br><span class="line"><span class="comment">// Find:     47505257 02</span></span><br><span class="line"><span class="comment">// Replace:  58505257 02</span></span><br><span class="line"><span class="comment">//</span></span><br><span class="line"><span class="type">DefinitionBlock</span> (<span class="string">""</span>, <span class="string">"SSDT"</span>, <span class="number">2</span>, <span class="string">"SUKA"</span>, <span class="string">"GPRW"</span>, <span class="number">0</span>)</span><br><span class="line">&#123;</span><br><span class="line">    <span class="type">External</span>(<span class="type">XPRW</span>, <span class="type">MethodObj</span>)</span><br><span class="line">    <span class="type">Method</span> (<span class="type">GPRW</span>, <span class="number">2</span>, <span class="type">NotSerialized</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="type">If</span> ((<span class="number">0x6D</span> == <span class="type">Arg0</span>))</span><br><span class="line">        &#123;</span><br><span class="line">            <span class="type">Return</span> (<span class="type">Package</span> ()</span><br><span class="line">            &#123;</span><br><span class="line">                <span class="number">0x6D</span>, </span><br><span class="line">                <span class="type">Zero</span></span><br><span class="line">            &#125;)</span><br><span class="line">        &#125;</span><br><span class="line"></span><br><span class="line">        <span class="type">If</span> ((<span class="number">0x0D</span> == <span class="type">Arg0</span>))</span><br><span class="line">        &#123;</span><br><span class="line">            <span class="type">Return</span> (<span class="type">Package</span> ()</span><br><span class="line">            &#123;</span><br><span class="line">                <span class="number">0x0D</span>, </span><br><span class="line">                <span class="type">Zero</span></span><br><span class="line">            &#125;)</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="type">Return</span> (<span class="type">XPRW</span> (<span class="type">Arg0</span>, <span class="type">Arg1</span>))</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><p>这个 <code>SSDT</code> 的原理是，通过 <code>DSDT</code> 重命名将原始的 <code>GPRW,2</code> 函数重命名为 <code>XPRW,2</code> ，然后通过 <code>SSDT</code> 新增一个 <code>GPRW</code> 函数，这样实际 ACPI 调用 GPRW 函数时就是调用的 <code>SSDT</code> 里添加的 GPRW 函数。</p><p>但是现在，<code>OpenCore</code> 将会对所有操作系统一视同仁，所有 SSDT、DSDT 重命名对包括 Windows 在内的所有操作系统生效，那么 <code>SSDT</code> 中的 GPRW 函数也会在 Windows 生效，可能就会导致未知的后果。所以，我们需要通过 <code>OSI</code> 函数，判断当前操作系统，确保函数的行为只对某一个操作系统生效：</p><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">//</span></span><br><span class="line"><span class="comment">// In config ACPI, GPRW to XPRW</span></span><br><span class="line"><span class="comment">// Find:     47505257 02</span></span><br><span class="line"><span class="comment">// Replace:  58505257 02</span></span><br><span class="line"><span class="comment">//</span></span><br><span class="line"><span class="comment">// 需要注意的是，ACPI 里不支持非 ASCII 字符注释，这里仅做示例，不可直接用于编译</span></span><br><span class="line"><span class="type">DefinitionBlock</span> (<span class="string">""</span>, <span class="string">"SSDT"</span>, <span class="number">2</span>, <span class="string">"OCLT"</span>, <span class="string">"GPRW"</span>, <span class="number">0</span>)</span><br><span class="line">&#123;</span><br><span class="line">    <span class="type">External</span>(<span class="type">XPRW</span>, <span class="type">MethodObj</span>) <span class="comment">// 对 XPRW 函数的外部引用</span></span><br><span class="line">    <span class="type">Method</span> (<span class="type">GPRW</span>, <span class="number">2</span>, <span class="type">NotSerialized</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="type">If</span> (_OSI (<span class="string">"Darwin"</span>)) <span class="comment">// 如果当前的操作系统是 macOS，生效以下行为</span></span><br><span class="line">        &#123;</span><br><span class="line">            <span class="type">If</span> ((<span class="number">0x6D</span> == <span class="type">Arg0</span>))</span><br><span class="line">            &#123;</span><br><span class="line">                <span class="type">Return</span> (<span class="type">Package</span> ()</span><br><span class="line">                &#123;</span><br><span class="line">                    <span class="number">0x6D</span>, </span><br><span class="line">                    <span class="type">Zero</span></span><br><span class="line">                &#125;)</span><br><span class="line">            &#125;</span><br><span class="line"></span><br><span class="line">            <span class="type">If</span> ((<span class="number">0x0D</span> == <span class="type">Arg0</span>))</span><br><span class="line">            &#123;</span><br><span class="line">                <span class="type">Return</span> (<span class="type">Package</span> ()</span><br><span class="line">                &#123;</span><br><span class="line">                    <span class="number">0x0D</span>, </span><br><span class="line">                    <span class="type">Zero</span></span><br><span class="line">                &#125;)</span><br><span class="line">            &#125;</span><br><span class="line">        &#125;</span><br><span class="line">        <span class="comment">// 否则，直接返回 XPRW 函数。只有三种情况下会走到这一步：</span></span><br><span class="line">        <span class="comment">// 第一个参数不是 0x6D、第一个参数不是 0x0D、当前操作系统不是 macOS</span></span><br><span class="line">        <span class="comment">// XPRW 是 ` DSDT ` 中原始的 GPRW 函数重命名而来</span></span><br><span class="line">        <span class="comment">// 所以这一步实际上是调用了原始 ` DSDT ` 中原始的 GPRW 方法</span></span><br><span class="line">        <span class="type">Return</span> (<span class="type">XPRW</span> (<span class="type">Arg0</span>, <span class="type">Arg1</span>))</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><p>上面以 GPRW 为例介绍了相关思路，接下来我们以亮度快捷键补丁为例实际操作一下如何一步一步修改 SSDT。大部分亮度快捷键都是基于 EC Query 触发的，因此在 <code>Clover</code> 中我们的亮度快捷键 <code>SSDT</code> 可能是这样的：</p><figure class="highlight swift"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">// In config ACPI, _Q14 renamed XQ14</span></span><br><span class="line"><span class="comment">// Find:     5F 51 31 34</span></span><br><span class="line"><span class="comment">// Replace:  58 51 31 34</span></span><br><span class="line"></span><br><span class="line"><span class="comment">// In config ACPI, _Q15 renamed XQ15</span></span><br><span class="line"><span class="comment">// Find:     5F 51 31 35</span></span><br><span class="line"><span class="comment">// Replace:  58 51 31 35</span></span><br><span class="line"></span><br><span class="line"><span class="type">DefinitionBlock</span>(<span class="string">""</span>, <span class="string">"SSDT"</span>, <span class="number">2</span>, <span class="string">"SUKA"</span>, <span class="string">"BrightFN"</span>, <span class="number">0</span>)</span><br><span class="line">&#123;</span><br><span class="line">    <span class="type">External</span>(_SB.<span class="type">PCI0</span>.<span class="type">LPCB</span>.<span class="type">KBD</span>, <span class="type">DeviceObj</span>)</span><br><span class="line">    <span class="type">External</span>(_SB.<span class="type">PCI0</span>.<span class="type">LPCB</span>.<span class="type">EC</span>, <span class="type">DeviceObj</span>)</span><br><span class="line">    </span><br><span class="line">    <span class="type">Scope</span> (_SB.<span class="type">PCI0</span>.<span class="type">LPCB</span>.<span class="type">EC</span>)</span><br><span class="line">    &#123;</span><br><span class="line">        <span class="type">Method</span> (_Q14, <span class="number">0</span>, <span class="type">NotSerialized</span>)<span class="comment">//up</span></span><br><span class="line">        &#123;</span><br><span class="line">            <span class="type">Notify</span>(\_SB.<span class="type">PCI0</span>.<span class="type">LPCB</span>.<span class="type">KBD</span>, <span class="number">0x0406</span>)</span><br><span class="line">        &#125;</span><br><span class="line">    </span><br><span class="line">        <span class="type">Method</span> (_Q15, <span class="number">0</span>, <span class="type">NotSerialized</span>)<span class="comment">//down</span></span><br><span class="line">        &#123;</span><br><span class="line">            <span class="type">Notify</span>(\_SB.<span class="type">PCI0</span>.<span class="type">LPCB</span>.<span class="type">KBD</span>, <span class="number">0x0405</span>)</span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><blockquote><p>如果想知道亮度快捷键补丁的工作原理，请参看我的另一篇文章「<a href="https://blog.skk.moe/post/ssdt-map-fn-shortcuts/" target="_blank" rel="noopener">黑苹果自定义键盘 Fn 快捷键</a>」。</p></blockquote><p>根据同样的思路，我们先在 Method 定义中添加 <code>OSI</code> 函数判断操作系统：</p><figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><span class="line">DefinitionBlock("", "SSDT", 2, "hack", "BrightFN", 0)</span><br><span class="line">&#123;</span><br><span class="line">    External(_SB.PCI0.LPCB.KBD, DeviceObj)</span><br><span class="line">    External(_SB.PCI0.LPCB.EC, DeviceObj)</span><br><span class="line">    </span><br><span class="line">    Scope (_SB.PCI0.LPCB.EC)</span><br><span class="line">    &#123;</span><br><span class="line">        Method (_Q14, 0, NotSerialized)//up</span><br><span class="line">        &#123;</span><br><span class="line"><span class="addition">+            If (_OSI ("Darwin"))</span></span><br><span class="line"><span class="addition">+            &#123;</span></span><br><span class="line">                  Notify(\_SB.PCI0.LPCB.KBD, 0x0406)</span><br><span class="line"><span class="addition">+            &#125;</span></span><br><span class="line">        &#125;</span><br><span class="line">    </span><br><span class="line">        Method (_Q15, 0, NotSerialized)//down</span><br><span class="line">        &#123;</span><br><span class="line"><span class="addition">+            If (_OSI ("Darwin"))</span></span><br><span class="line"><span class="addition">+            &#123;</span></span><br><span class="line">                  Notify(\_SB.PCI0.LPCB.KBD, 0x0405)</span><br><span class="line"><span class="addition">+            &#125;</span></span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><p>由于这里不是以 Return 结束的，所以我们要为 <code>If</code> 加上 <code>Else</code>：</p><figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br></pre></td><td class="code"><pre><span class="line">DefinitionBlock("", "SSDT", 2, "hack", "BrightFN", 0)</span><br><span class="line">&#123;</span><br><span class="line">    External(_SB.PCI0.LPCB.KBD, DeviceObj)</span><br><span class="line">    External(_SB.PCI0.LPCB.EC, DeviceObj)</span><br><span class="line"></span><br><span class="line">    Scope (_SB.PCI0.LPCB.EC)</span><br><span class="line">    &#123;</span><br><span class="line">        Method (_Q14, 0, NotSerialized)//up</span><br><span class="line">        &#123;</span><br><span class="line"><span class="addition">+            If (_OSI ("Darwin"))</span></span><br><span class="line"><span class="addition">+            &#123;</span></span><br><span class="line">                  Notify(\_SB.PCI0.LPCB.KBD, 0x0406)</span><br><span class="line"><span class="addition">+            &#125; Else &#123;</span></span><br><span class="line"><span class="addition">+</span></span><br><span class="line"><span class="addition">+            &#125;</span></span><br><span class="line">        &#125;</span><br><span class="line">    </span><br><span class="line">        Method (_Q15, 0, NotSerialized)//down</span><br><span class="line">        &#123;</span><br><span class="line"><span class="addition">+            If (_OSI ("Darwin"))</span></span><br><span class="line"><span class="addition">+            &#123;</span></span><br><span class="line">                  Notify(\_SB.PCI0.LPCB.KBD, 0x0405)</span><br><span class="line"><span class="addition">+            &#125; Else &#123;</span></span><br><span class="line"><span class="addition">+</span></span><br><span class="line"><span class="addition">+            &#125;</span></span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><p>在 <code>Else</code> 区域中，调用原始 <code>DSDT</code> 中原始的 <code>_Q14</code>、<code>_Q15</code> 函数、也就是现在已经被重命名为 <code>XQ14</code> 和 <code>XQ15</code> 的函数。当然，别忘了在文件头部添加对 <code>XQ14</code> 和 <code>XQ15</code> 的函数的外部引用：</p><figure class="highlight diff"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br></pre></td><td class="code"><pre><span class="line">DefinitionBlock("", "SSDT", 2, "hack", "BrightFN", 0)</span><br><span class="line">&#123;</span><br><span class="line">    External(_SB.PCI0.LPCB.KBD, DeviceObj)</span><br><span class="line">    External(_SB.PCI0.LPCB.EC, DeviceObj)</span><br><span class="line"><span class="addition">+    External(_SB.PCI0.LPCB.EC.XQ14, MethodObj)</span></span><br><span class="line"><span class="addition">+    External(_SB.PCI0.LPCB.EC.XQ15, MethodObj)</span></span><br><span class="line">    </span><br><span class="line">    Scope (_SB.PCI0.LPCB.EC)</span><br><span class="line">    &#123;</span><br><span class="line">        Method (_Q14, 0, NotSerialized)//up</span><br><span class="line">        &#123;</span><br><span class="line"><span class="addition">+            If (_OSI ("Darwin"))</span></span><br><span class="line"><span class="addition">+            &#123;</span></span><br><span class="line">                  Notify(\_SB.PCI0.LPCB.KBD, 0x0406)</span><br><span class="line"><span class="addition">+            &#125; Else &#123;</span></span><br><span class="line"><span class="addition">+                  \_SB.PCI0.LPCB.EC.XQ14()</span></span><br><span class="line"><span class="addition">+            &#125;</span></span><br><span class="line">        &#125;</span><br><span class="line">    </span><br><span class="line">        Method (_Q15, 0, NotSerialized)//down</span><br><span class="line">        &#123;</span><br><span class="line"><span class="addition">+            If (_OSI ("Darwin"))</span></span><br><span class="line"><span class="addition">+            &#123;</span></span><br><span class="line">                  Notify(\_SB.PCI0.LPCB.KBD, 0x0405)</span><br><span class="line"><span class="addition">+            &#125; Else &#123;</span></span><br><span class="line"><span class="addition">+                  \_SB.PCI0.LPCB.EC.XQ15()</span></span><br><span class="line"><span class="addition">+            &#125;</span></span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure><p>这样就大功告成了。</p><p>是不是有些头昏脑涨？实际上，和 <code>Clover</code> 现成的 <code>SSDT</code> 补丁库一样，<code>OpenCore</code> 也有现成的 <code>SSDT</code> 补丁库 <a href="https://github.com/daliansky/OC-little" target="_blank" rel="noopener">OC-little</a>，由资深黑苹果爱好者们维护。我也在其中贡献了一些补丁（如 PTWSAK 关机变重启修复）和说明。 你在 <code>Clover</code> 中使用的 <code>SSDT</code> 补丁，大部分都有对应的 <code>OpenCore</code> 下可用的 <code>SSDT</code> 替代，免去了你手动修改的痛苦。而且，你还可能通过 OC-little 库里的其他补丁修复了一些你之前的 <code>SSDT</code> 补丁没有解决的问题。</p><p>当然，对于一些 OC-little 中没有等价替代的补丁，你仍然需要手动修改、添加操作系统判断；对于直接修补的 DSDT，你也只能自己在 <code>Method</code> 中添加对应的判断。</p><p>如果你完成了对 SSDT、DSDT 的修改，现在备份你的 EFI、然后修改后的 SSDT、DSDT 放到 <code>EFI/Clover/ACPI/patched</code> 之中，然后以 <code>-v</code> 重启，看看能不能正常开机。如果可以正常开机，登录以后打开终端执行以下命令、查看日志中是否包括 ACPI Error：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ <span class="built_in">log</span> show --last boot | grep -Ei <span class="string">"ACPI"</span></span><br></pre></td></tr></table></figure><p>如果正常开机，没有 ACPI Error，那么恭喜你，你已经迈出了向 <code>OpenCore</code> 迁移的第一步，而且此时你依然还在继续使用 <code>Clover</code> ，你的黑苹果没有收到任何影响。</p><h2 id="减少不必要的-dsdt-重命名"><a class="markdownIt-Anchor" href="#减少不必要的-dsdt-重命名"></a> 减少不必要的 <code>DSDT</code> 重命名</h2><p><a href="https://github.com/acidanthera" target="_blank" rel="noopener">acidanthera</a> 团队认为，应该尽可能减少 <code>DSDT</code> 重命名、减少改动以避免对设备硬件造成伤害。</p><p>以下是一些不再需要的重命名，你可以参考这个表自己精简 <code>DSDT</code> 重命名、使用 <code>SSDT</code> 代替：</p><ul><li><code>EHC1 to EH01</code> 和 <code>EHC2 to EH02</code> ：建议由 <code>OpenCore</code> 官方的 <a href="https://github.com/%5Bacidanthera%5D(https://github.com/acidanthera)/OpenCorePkg/blob/master/Docs/AcpiSamples/SSDT-EHCx_OFF.dsl" target="_blank" rel="noopener"><code>SSDT-EHCx_OFF</code></a> 关闭 EHC 控制器。Skylake 这类六代以上已经没有 EHC 控制器了，可以直接删除。</li><li><code>SAT0 to SATA</code> 和 <code>SAT1 to SATA</code> ：实质上完全没用。</li><li><code>HECI to IMEI</code>、<code>HEC1 to IMEI</code>、<code>MEI to IMEI</code> 和 <code>IDER to MEID</code>：WhateverGreen 能够处理这个问题。</li><li><code>GFX0 to IGPU</code>、<code>PEG0 to GFX0</code>、<code>PEGP to GFX0</code> 和 <code>SL01 to PEGP</code>：WhateverGreen 能够处理这个问题。</li><li><code>EC0 to EC</code>、<code>H_EC to EC</code>、<code>ECDV to EC</code> 和 <code>PGEC to EC</code> ：虽然 macOS 的 USB 电源管理需要名称为 <code>EC</code> 的控制器，但是你完全可以在 OC-little 中找到「仿冒 EC」的相关 <code>SSDT</code> 补丁。</li><li><code>HDAS to HDEF</code>、<code>CAVS to HDEF</code> 和 <code>AZAL to HDEF</code> ：AppleALC 能够处理这个问题，除非你在用 VoodooHDA 万能声卡。</li><li><code>STAS to Noop</code> ：建议由 OC-little 中的 <code>SSDT-AWAC</code> 相关补丁替代。</li></ul><blockquote><p>经 <a href="https://github.com/williambj1" target="_blank" rel="noopener">Bat.bat</a> 大佬指出，由于新的时钟设备 AWAC 的普及，用 Noop 会导致同时启用两个时钟设备，在 macOS 下只有一个能正常工作、但是在 Windows 下面暴露两个设备无疑对系统有害，同时也严重违反 ACPI 规范。<code>STAS</code> 这个变量的意义使 AWAC 和 RTC 互锁以避免这种危害。因此，使用 <code>SSDT-AWAC</code> 是更理想的办法。</p></blockquote><ul><li><code>PXSX to ANS1</code> 和 <code>PXSX to ANS2</code> ：建议用 <a href="https://github.com/%5Bacidanthera%5D(https://github.com/acidanthera)/NVMeFix" target="_blank" rel="noopener">NVMeFix</a> 这个 kext 修复 NVMe SSD 的电源管理。</li><li><code>LPC0 to LPCB</code> ：如果你要添加 SMBUS 支持，OC-little 中分别有 SBUS 的 <code>SSDT</code> 注入补丁和 MCHC 设备补丁。</li></ul><blockquote><p>顺便提醒一下，使用 OC-little 的补丁的时候，需要注意设备的原始 <code>DSDT</code> 中的 LPC 总线名称，并且要自己修改 <code>SSDT</code> 以使 LPC 总线匹配。</p></blockquote><ul><li><code>PC00 to PCIO</code>、<code>FPU to MATH</code>、<code>TMR to TIMR</code>、<code>GBE1 to ETH0</code> 和 <code>PIC to IPIC</code> ：这些重命名也是实质上是完全没用的。</li><li><code>_OSI to XOSI</code> 和 <code>OSID to XSID</code> ：除非你的某些硬件设备只能在 Windows 下工作（比如 I2C 触摸板只能在 Windows 下使用，再比如 ThinkPad 对 FreeBSD 的特殊优化），否则完全没有必要使用 <code>SSDT-XOSI</code> 补丁来伪装操作系统。而且大部分情况下，直接定制 <code>SSDT</code> 也可以解除某些硬件的操作系统限制。</li></ul><blockquote><p>关于「定制 <code>SSDT</code> 以解除限制」，Bat.bat 大佬做了一些说明：一种方法是通过「预置变量法」（详见 OC-little 的「总述」章节）禁用原始设备的函数如 <code>_STA</code>，另一种方法是通过重命名实现对相关 <code>_STA</code> 的函数的精确重命名，然后通过 <code>SSDT</code> 添加新的 <code>_STA</code> 函数（SSDT 中可以添加 <code>OSI</code> 操作系统判断函数）。</p></blockquote><ul><li><code>_DSM to XDSM</code> ：首先遍历一下你的 <code>SSDT</code> 补丁中没有依赖 <code>_DSM</code> 的，如果没有，这个重命名也应该删除，因为这个重命名涉及的范围实在太大了、太过于危险。</li></ul><p>我的建议是，尽可能只添加和 <code>Method</code> 名称有关的重命名（如 <code>GPRW to XPRW</code>、<code>_Q14 to XQ14</code>），而且随后要通过 <code>SSDT</code> 确保在非 macOS 操作系统下要调用并返回原始函数，确保在非 macOS 操作系统下的原始 <code>DSDT</code> 行为不会被改变。如果万不得已要添加其它重命名（如通过重命名禁用某些设备），那么就要权衡这一重命名的后果。</p><p>如果你完成了精简 <code>DSDT</code> 重命名并保存了 config，接下来的操作还是一样的，备份原始 EFI、然后以 <code>-v</code> 重启，看看能不能正常开机。如果可以正常开机，登录以后打开终端执行以下命令、查看日志中是否包括 ACPI Error：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ <span class="built_in">log</span> show --last boot | grep -Ei <span class="string">"ACPI"</span></span><br></pre></td></tr></table></figure><p>完成这一步，你依然没有必要离开 <code>Clover</code> 。我说过了，「渐进式」地迁移，嗯？</p><h2 id="摆脱对-clover-acpi-quirks-的依赖"><a class="markdownIt-Anchor" href="#摆脱对-clover-acpi-quirks-的依赖"></a> 摆脱对 <code>Clover</code> ACPI Quirks 的依赖</h2><p>Clover 实在是非常方便。一个开关，关机变重启就修复了；三个开关，HPET、IRQ、TIMR 就修复了；等等等等。但是 <code>OpenCore</code> 是没有内置这些 ACPI 修复的，所以在 <code>Clover</code> 下用开关实现的 ACPI 修复现在都必须用 <code>SSDT</code> 实现。所幸的是，我们依然可以从 OC-little 里找到绝大部分我们需要的补丁。</p><ul><li><code>FixIPIC</code>：参考 OC-little 的「声卡 IRQ 补丁」章节</li><li><code>FixSBUS</code>：参考 OC-little 的「注入 SBUS 设备」</li><li><code>FixShutdown</code>：参考 OC-little 的「PTSWAK 综合补丁章节」，需要添加其中的 EXT1 插件补丁（该补丁由我贡献）</li><li><code>FixDisplay</code>：使用 WhateverGreen 和定制缓冲帧补丁解决</li><li><code>AddMCHC</code>：参考 OC-little 的「注入缺失的 MCHC」章节</li><li><code>FixHDA</code>：使用 AppleALC 即可</li><li><code>FixHPET</code>：参考 OC-little 的「声卡 IRQ 补丁」章节</li><li><code>FixSATA</code>：这个先不管它，<code>OpenCore</code> 中有个 <code>ExternalDiskIcons</code> 的 Quirk，也可以使用 <code>innie.kext</code> 解决。</li><li><code>FixADP1</code>：使用 <code>DSDT</code> 重命名 <code>AC0_ to ADP1</code>，可能还要额外注入 <code>Name (_PRW, Package (0x02) {0x1C,0x03})</code>。</li><li><code>FixRTC</code>：参考 OC-little 的「声卡 IRQ 补丁」章节</li><li><code>FixTIMR</code>：参考 OC-little 的「声卡 IRQ 补丁」章节</li><li><code>AddPNLF</code>：参考 OC-little 的「注入 PNLF」章节</li><li><code>AddIMEI</code>：使用 WhateverGreen 即可</li><li><code>FixIntelGfx</code>：使用 WhateverGreen 即可</li><li><code>AddHDMI</code>：使用 WhateverGreen 即可</li></ul><p>除了这些开关以外，Clover 还有一些其它的 ACPI 设定，也有与之对应的替代。</p><ul><li><code>DisableASPM</code>：没有很好的代替方法，可以在设备属性（DeviceProperties）中分别添加相关设备的 PCI 总线位置并注入属性 <code>pci-aspm-default | DATA | &lt;00&gt;</code>。</li><li><code>PluginType</code>：参考 OC-little 的「注入 X86」章节</li><li><code>Generate P States</code> 和 <code>Generate C States</code>：这些是六代以前 CPU 才需要的设置，可以用 <a href="https://github.com/Piker-Alpha/ssdtPRGen.sh" target="_blank" rel="noopener">ssdtPRGen.sh</a> 生成对应的 SSDT。</li></ul><p>当然之后的事情还是一样的，以 <code>-v</code> 重启，正常开机后打开终端查看日志中是否包括 ACPI Error：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ <span class="built_in">log</span> show --last boot | grep -Ei <span class="string">"ACPI"</span></span><br></pre></td></tr></table></figure><p>当你把所有 <code>Clover</code> 的开关都用 <code>SSDT</code> 代替以后，你离迁移到 <code>OpenCore</code> 就越来越近了。</p><h2 id="更新设备属性"><a class="markdownIt-Anchor" href="#更新设备属性"></a> 更新设备属性</h2><h3 id="使用缓冲帧补丁驱动-intel-核显"><a class="markdownIt-Anchor" href="#使用缓冲帧补丁驱动-intel-核显"></a> 使用缓冲帧补丁驱动 Intel 核显</h3><p>如果你还在用 <code>Clover</code> 的 InjectIntel 的方式来驱动 Intel 核显的话，是时候更换到 WhateverGreen 和缓冲帧补丁的方式了。</p><p>建议参考以下几篇文章：</p><ul><li><a href="https://blog.zuiyu1818.cn/posts/Hac_Intel_Graphics.html" target="_blank" rel="noopener">使用 WhateverGreen 驱动 Intel 核显 | 醉渔小站</a></li><li><a href="https://blog.daliansky.net/Intel-FB-Patcher-tutorial-and-insertion-pose.html#%E6%A0%B8%E5%BF%83%E5%8A%9F%E8%83%BD%E7%BB%99%E7%BC%93%E5%86%B2%E5%B8%A7%E6%89%93%E8%A1%A5%E4%B8%81">Hackintool(原Intel FB-Patcher)使用教程及插入姿势 | 黑果小兵的部落阁</a></li><li><a href="https://github.com/%5Bacidanthera%5D(https://github.com/acidanthera)/WhateverGreen/blob/master/Manual/FAQ.IntelHD.en.md" target="_blank" rel="noopener">Intel 核显驱动常见问题 | WhateverGreen</a> （务必看英文版，中文翻译严重过时）</li></ul><h3 id="新的声卡-layout-id-注入方式"><a class="markdownIt-Anchor" href="#新的声卡-layout-id-注入方式"></a> 新的声卡 layout-id 注入方式</h3><p>大部分黑苹果的声卡教程都已经推荐此处留空、直接在设备属性中注入 layout-id 了，不过我还是再冗笔一下。</p><p>下载 <a href="https://github.com/acidanthera" target="_blank" rel="noopener">acidanthera</a> 开发的工具 <a href="https://github.com/%5Bacidanthera%5D(https://github.com/acidanthera)/gfxutil/releases" target="_blank" rel="noopener">gfxutils</a>，使用下述命令找出声卡的 PCI 总线位置：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">$ path/to/gfxutils -f HDEF</span><br><span class="line">$ path/to/gfxutils -f HDAS</span><br><span class="line">$ path/to/gfxutils -f HDAU</span><br></pre></td></tr></table></figure><p>然后在设备属性中添加 PCI 总线位置、注入 <code>layout-id</code> 属性。</p><p>至于 <code>AFGLowPowerState</code>，需要额外为声卡设备注入 <code>AFGLowPowerState</code> 属性，值为 <code>DATA | &lt;01000000&gt;</code>、至于 <code>ResetHDA</code>，推荐安装 <a href="https://github.com/fewtarius/jackfix" target="_blank" rel="noopener">JackFix</a>。</p><h2 id="开始组织-opencore-目录"><a class="markdownIt-Anchor" href="#开始组织-opencore-目录"></a> 开始组织 <code>OpenCore</code> 目录</h2><p>终于是时候了，所有的准备工作都做完了！你可以抽出一天（最好占卜一下是否是吉日），沐浴更衣，然后开始组织你的 <code>OpenCore</code> 目录。</p><h3 id="下载-opencore-所需文件"><a class="markdownIt-Anchor" href="#下载-opencore-所需文件"></a> 下载 <code>OpenCore</code> 所需文件</h3><ul><li><a href="https://github.com/%5Bacidanthera%5D(https://github.com/acidanthera)/OpenCorePkg/releases" target="_blank" rel="noopener">OpenCorePkg</a> - <code>OpenCore</code> 本体、一些 <code>SSDT</code> 补丁、目录结构</li><li><a href="https://github.com/%5Bacidanthera%5D(https://github.com/acidanthera)/MacInfoPkg/releases" target="_blank" rel="noopener">MacInfoPkg</a> - 导出你当前的三码、以及生成新的三码</li><li><a href="https://github.com/%5Bacidanthera%5D(https://github.com/acidanthera)/AppleSupportPkg/releases" target="_blank" rel="noopener">AppleSupportPkg</a> - 包括三个 EFI 驱动，<code>ApfsDriverLoader</code>、<code>VBoxHfs</code>、<code>AudioDxe</code></li><li><a href="https://github.com/%5Bacidanthera%5D(https://github.com/acidanthera)/OcBinaryData" target="_blank" rel="noopener">OcBinaryData</a> - 包含两个闭源驱动 <code>HfsPlus.efi</code> 和 <code>ExFatDxe.efi</code>，以及 <code>OpenCore</code> 官方主题的图标文件。<ul><li>非常推荐安装 <code>OpenCore</code> 官方做的主题，和真 Mac 的 BootPicker 一模一样（除了没有网络图标）。不过那可能是另一篇文章的主题了。</li></ul></li></ul><h3 id="决定你使用的配置文件编辑器"><a class="markdownIt-Anchor" href="#决定你使用的配置文件编辑器"></a> 决定你使用的配置文件编辑器</h3><ul><li><a href="https://github.com/corpnewt/ProperTree" target="_blank" rel="noopener">ProperTree</a>：一个 Python 编写的 plist 编辑器，专门优化了 <code>OpenCore</code> 和 <code>Clover</code> 配置文件编写。</li><li>Xcode：非常不推荐，Xcode 11 不仅花里胡哨、而且处理 plist data 和大整数方面存在问题。<ul><li>简单来说，Apple 没有再开放旧版的 Xcode 10 下载、而且 Apple 的 CDN 还有防盗链。因此如果我要写一篇从 Apple 官方下载 Xcode 10 的教程，那么会比你现在看的这篇的「从 <code>Clover</code> 到 <code>OpenCore</code>」要长得多。</li><li>如果你和我一样成功下载了 Xcode 10 或者就没有升级到 Xcode 11：我刚才什么都没写，你什么都没看见。</li></ul></li><li><a href="https://mackie100projects.altervista.org/opencore-configurator/" target="_blank" rel="noopener"><code>OpenCore</code> Configurator</a>：Clover Configurator 作者的新作品。很适合新手使用。<ul><li><code>OpenCore</code> 的配置文件变更非常频繁，因此只应该用 <strong>最新版的 <code>OpenCore</code> Configurator</strong> 搭配 <strong>最新的正式版的 <code>OpenCore</code></strong>，否则配置文件格式错误将会导致无法引导。</li><li><code>OpenCore</code> Configurator 有不少低级 Bug（后来更新时都修复了），比如之前有一个版本，在应对 <code>VoodooPS2Controller</code> 和 <code>VooooI2C</code> 这种嵌套 kext 时，会只添加内部 kext 的 <code>dsYM</code> 签名文件、却不添加内部 kext 本体。</li><li>反正就是，使用后果自负。</li></ul></li></ul><h3 id="生成目录结构"><a class="markdownIt-Anchor" href="#生成目录结构"></a> 生成目录结构</h3><p>解压下载的 <code>OpenCore</code> 并解压，将其中的 EFI 目录 <strong>复制出来到别处</strong>。</p><blockquote><p>直到配置好以后，再将这个目录合并进硬盘上的 EFI 分区。</p></blockquote><p>将 Docs 目录下的 <code>Sample.list</code> 复制到 <code>EFI/OC</code> 目录下、并重命名为 <code>config.plist</code>。</p><blockquote><p>如果你下载的是 <code>OpenCore</code> 0.5.7 版本，还需要额外将 <code>Reources</code> 目录复制到 <code>EFI/OC</code> 目录之中。</p></blockquote><p>解压下载的 AppleSupportPkg，将其中的 Drivers 目录和 Tools 目录中的文件复制到 <code>EFI/OC/Drivers</code> 目录和 <code>EFI/OC/Tools</code> 目录中。</p><p>解压下载的 OcBinaryData，将其中 Drivers 目录复制到 <code>EFI/OC/Drivers</code> 目录中。</p><h3 id="删除不需要的文件"><a class="markdownIt-Anchor" href="#删除不需要的文件"></a> 删除不需要的文件</h3><p>删除 Drivers 目录中的这些文件：</p><ul><li><code>ExFatDxe</code> 和 <code>ExFatDxeLegacy</code>：除非你的 EFI 分区或者某个系统分区是 ExFAT 分区格式的，否则不需要保留。</li><li><code>HfsPlus</code>、<code>HfsPlusLegacy</code> 和 <code>VBoxHfs</code>：三者只要留其中一个即可。一般推荐用 HfsPlus，比 VBoxHfs 速度快三倍。在四代以前机型上应该用 HfsPlusLegcay 而不是 HfsPlus。</li><li><code>AppleUsbKbDxe</code> 或 <code>OpenUsbKbDxe</code>：这是为三代以前机型使用的，现代的机器应该使用 <code>OpenCore</code> 中的 <code>KeySupport</code> 这个 Quirk。</li><li><code>NvmExpressDxe</code>：这是为四代以前机型使用的 NVMe 硬盘加载驱动，现代的机器已经不需要了。</li><li><code>XhciDxe</code>：为二代以前的主板提供 XHCI 支持的，现代的机器已经不需要了。</li><li><code>HiiDatabase</code>：为四代以前的设备提供 UEFI 界面字体渲染支持的，现代的机器已经不需要了。</li></ul><p>删除 Tools 目录中的这些文件：</p><ul><li><code>BootKicker</code>：调用 Mac 内置的引导界面，是用于给白苹果安装 <code>OpenCore</code> 时用的，黑苹果用不上。</li></ul><hr><p>现在，你的 <code>OpenCore</code> EFI 目录的结构应该是这样的：</p><figure class="highlight reasonml"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br></pre></td><td class="code"><pre><span class="line">EFI</span><br><span class="line">├── BOOT</span><br><span class="line">│   └── <span class="module-access"><span class="module"><span class="identifier">BOOTx64</span>.</span></span>efi</span><br><span class="line">└── OC</span><br><span class="line">    ├── ACPI</span><br><span class="line">    ├── Drivers</span><br><span class="line">    │   ├── <span class="module-access"><span class="module"><span class="identifier">ApfsDriverLoader</span>.</span></span>efi</span><br><span class="line">    │   ├── <span class="module-access"><span class="module"><span class="identifier">AudioDxe</span>.</span></span>efi</span><br><span class="line">    │   ├── <span class="module-access"><span class="module"><span class="identifier">HfsPlus</span>.</span></span>efi</span><br><span class="line">    │   ├── <span class="module-access"><span class="module"><span class="identifier">OpenCanopy</span>.</span></span>efi</span><br><span class="line">    │   └── <span class="module-access"><span class="module"><span class="identifier">OpenRuntime</span>.</span></span>efi</span><br><span class="line">    ├── Kexts</span><br><span class="line">    ├── <span class="module-access"><span class="module"><span class="identifier">OpenCore</span>.</span></span>efi</span><br><span class="line">    ├── Resources</span><br><span class="line">    └── Tools</span><br><span class="line">        ├── <span class="module-access"><span class="module"><span class="identifier">ChipTune</span>.</span></span>efi</span><br><span class="line">        ├── ......</span><br><span class="line">        └── <span class="module-access"><span class="module"><span class="identifier">VerifyMsrE2</span>.</span></span>efi</span><br></pre></td></tr></table></figure><p>现在，你可以把你的 SSDT、DSDT 从 <code>Clover</code> 里的 <code>Clover/ACPI/Patched</code> 复制出来、粘贴进 <code>EFI/OC/ACPI</code> 目录中；将 Kext 从 <code>Clover/Kexts/*/</code> 中复制出来粘贴进 <code>EFI/OC/Kexts</code> 目录中。</p><h2 id="开始配置-opencore"><a class="markdownIt-Anchor" href="#开始配置-opencore"></a> 开始配置 <code>OpenCore</code></h2><p>这里我就不再赘述 <code>OpenCore</code> 的配置教程了。这里推荐几个写的不错的教程和足够有用的参考资料。</p><ul><li><code>OpenCore</code> 参考文档。当你解压下载的 <code>OpenCore</code> 时，<code>Docs/Configuration.pdf</code> 文件就是 <code>OpenCore</code> 的官方文档。这是最权威的 <code>OpenCore</code> 参考资料、没有之一。</li><li><a href="https://oc.skk.moe/" target="_blank" rel="noopener"><code>OpenCore</code> 简体中文参考手册</a>。<code>OpenCore</code> 参考手册的翻译，由我和一些黑苹果爱好者们共同在维护。</li></ul><blockquote><p>上面两份参考资料资料适合你在配置时不知道某个选项的具体作用、具体副作用时参考用，但是不适合直接对着它们配置 <code>config.plist</code>。<br>如果想要快速上手 <code>OpenCore</code> 配置，应该参考下面的教程：</p></blockquote><ul><li><a href="https://khronokernel-2.gitbook.io/opencore-vanilla-desktop-guide/" target="_blank" rel="noopener"><code>OpenCore</code> Vanilla Guide</a>。<code>OpenCore</code> 官方认可写得较好的新手教程。这篇教程受众是第一次接触黑苹果就想用 <code>OpenCore</code> 的人，因此内容写得非常浅显</li><li><a href="https://blog.daliansky.net/OpenCore-BootLoader.html#%E9%85%8D%E7%BD%AE-opencore">精解 <code>OpenCore</code> | 黑果小兵的部落阁</a>。国内最早的 <code>OpenCore</code> 介绍文档之一，提供了不少配置思路和 Quirks 的推荐配置。</li><li><a href="https://blog.xjn819.com/?p=543" target="_blank" rel="noopener">使用 <code>OpenCore</code> 引导黑苹果 | XJN’s Blog</a>。比较详细的 <code>OpenCore</code> 配置介绍，但是这篇文章的排版我实在是欣赏不来。</li><li><a href="https://kirainmoe.com/blog/post/opencore-migration-experience/#13-%e4%bf%ae%e6%94%b9-configplist" target="_blank" rel="noopener"><code>OpenCore</code> 引导迁移折腾记录 | 宇宙よりも遠い場所</a>。内容详细的 <code>OpenCore</code> 配置介绍，提供了不少 Quirks 的推荐配置。</li></ul><p>Clover 中的部分配置，如 <code>DSDT</code> 重命名，由于在之前已经精简，因此可以将 Find 和 Replace 的十六进制字符串逐对复制到 <code>OpenCore</code> 的配置文件中。</p><h2 id="clover-中的设置在-opencore-的等效配置"><a class="markdownIt-Anchor" href="#clover-中的设置在-opencore-的等效配置"></a> Clover 中的设置在 <code>OpenCore</code> 的等效配置</h2><p>现在你开始跟着我推荐的教程和参考资料开始配置 <code>OpenCore</code> 了。接下来我会写一些 <code>Clover</code> 中一些选项在 <code>OpenCore</code> 的对应等效配置，在配置 <code>OpenCore</code> 时别忘了跟着看看。</p><h3 id="boot-的相关设置"><a class="markdownIt-Anchor" href="#boot-的相关设置"></a> Boot 的相关设置</h3><ul><li>引导参数：<code>OpenCore</code> 中 <code>NVRAM -&gt; Add -&gt; 7C436110-AB2A-4BBB-A880-FE41995C9F82 -&gt; boot-args</code></li><li><code>NeverHibernate</code>：<code>Misc -&gt; Boot -&gt; HibernateMode -&gt; None</code><ul><li>其实不再建议禁用休眠，由于 <code>OpenCore</code> 的行为和白苹果更加接近，以至于已经可以实现 macOS 的完美休眠。</li></ul></li><li>Default Boot Volume：<code>OpenCore</code> 中 <code>Misc - Security - AllowSetDefaults - true</code><ul><li>然后在 <code>OpenCore</code> 的引导菜单处使用 Ctrl + Enter 按键进行选择</li><li>你也可以直接用「系统偏好设置」中的「启动磁盘」设置</li></ul></li><li>DefaultBackgroundColor：<code>OpenCore</code> 中的 <code>NVRAM -&gt; Add -&gt; 4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14-&gt; DefaultBackgroundColor</code> ，需要自己将 RGB 转换为 HEX。</li><li>EFILoginHiDPI：<code>OpenCore</code> 中 <code>NVRAM -&gt; Add -&gt; 4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14 -&gt; EFILoginHiDPI | Data | &lt;&gt;</code><ul><li>0 -&gt; <code>&lt;00000000&gt;</code></li><li>1 -&gt; <code>&lt;01000000&gt;</code></li></ul></li><li>flagstate：<code>OpenCore</code> 中 <code>NVRAM -&gt; Add -&gt; 4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14 -&gt; flagstate | Data | &lt;&gt;</code><ul><li>0 -&gt; <code>&lt;00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000&gt;</code></li><li>注意自行判断 NVRAM 键值对位置</li></ul></li><li>UIScale：<code>NVRAM -&gt; Add -&gt; 4D1EDE05-38C7-4A6A-9CC6-4BCCA8B38C14 -&gt; UIScale | Data | &lt;&gt;</code><ul><li>1 -&gt; <code>&lt;01&gt;</code></li><li>2 -&gt; <code>Data | &lt;02&gt;</code></li></ul></li></ul><h3 id="cpu-相关配置"><a class="markdownIt-Anchor" href="#cpu-相关配置"></a> CPU 相关配置</h3><ul><li>Type：在 <code>OpenCore</code> 中有对应的 <code>Platforminfo -&gt; SMBIOS -&gt; ProcessorType</code> 可以设置处理器类型<ul><li>在 <a href="https://github.com/%5Bacidanthera%5D(https://github.com/acidanthera)/EfiPkg/blob/master/Include/IndustryStandard/AppleSmBios.h" target="_blank" rel="noopener">这个文件</a> 查看可以选用的值</li></ul></li><li>HWPEnable：如果你真的要依赖 <code>MSR 0x770</code> （注意这里说的不是原生电源管理 <code>MSR 0xe2</code>）的 HWP 电源管理，建议安装 headkaze 开发的 <a href="https://github.com/headkaze/HWPEnable/tree/master/binary" target="_blank" rel="noopener"><code>HWPEnable.kext</code></a>。HackinTool 也是他开发的。</li><li>QEMU：<code>OpenCore</code> 已经完整支持虚拟机，因此 <code>OpenCore</code> 中不包含这一选项。</li><li>TurboDisable：建议用 CPUFriend 或者 <a href="http://ssdtPRGen.sh" target="_blank" rel="noopener">ssdtPRGen.sh</a> 来修复电源管理。</li></ul><h3 id="设备属性相关设置"><a class="markdownIt-Anchor" href="#设备属性相关设置"></a> 设备属性相关设置</h3><h4 id="usb"><a class="markdownIt-Anchor" href="#usb"></a> USB</h4><ul><li>FixOwnership：<code>OpenCore</code> 中 <code>UEFI -&gt; Quirk -&gt; ReleaseUsbOwnership</code></li><li>ClockID：需要自己注入对应的设备属性（Device Properties），属性为 <code>AAPL,clock-id</code></li><li>HighCurrent：需要自己注入对应的设备属性（Device Properties），属性为 <code>AAPL,HighCurrent</code><ul><li>对于 macOS 10.11 来说 HighCurrent 已经没啥用了。对于更新版的 macOS，推荐用 OC-little 中的 <code>SSDT-USBX</code> 补丁。</li></ul></li></ul><h4 id="fakeid"><a class="markdownIt-Anchor" href="#fakeid"></a> FakeID</h4><p>同样使用 gfxutils 工具找到 PCI 总线位置，然后分别注入相关属性：</p><ul><li><strong>USB</strong><ul><li><code>device-id</code></li><li><code>device_type</code></li><li><code>device_type</code></li></ul></li><li><strong>IMEI</strong><ul><li><code>device-id</code></li><li><code>vendor-id</code></li></ul></li><li><strong>WIFI</strong><ul><li><code>name</code></li><li><code>compatible</code></li></ul></li><li><strong>LAN</strong><ul><li><code>device-id</code></li><li><code>compatible</code></li><li><code>vendor-id</code></li></ul></li><li><strong>XHCI</strong><ul><li><code>device-id</code></li><li><code>device_type: UHCI</code></li><li><code>device_type: OHCI</code></li><li><code>device_type: EHCI</code><ul><li><code>device-id</code></li><li><code>AAPL,current-available</code></li><li><code>AAPL,current-extra</code></li><li><code>AAPL,current-available</code></li><li><code>AAPL,current-extra</code></li><li><code>AAPL,current-in-sleep</code></li><li><code>built-in</code></li></ul></li><li><code>device_type: XHCI</code><ul><li><code>device-id</code></li><li><code>AAPL,current-available</code></li><li><code>AAPL,current-extra</code></li><li><code>AAPL,current-available</code></li><li><code>AAPL,current-in-sleep</code></li><li><code>built-in</code></li></ul></li></ul></li></ul><h3 id="clover-中相关的图形设置"><a class="markdownIt-Anchor" href="#clover-中相关的图形设置"></a> Clover 中相关的图形设置</h3><p>和前文一样，这些在 <code>Clover</code> 中设置的属性都需要改为注入对应的设备属性即可。</p><ul><li><strong>InjectAti</strong>:<ul><li><code>DeviceProperties -&gt; Add -&gt; PCIRoot... -&gt; deviceID</code></li><li><code>DeviceProperties -&gt; Add -&gt; PCIRoot... -&gt; Connectors</code></li></ul></li><li><strong>InjectNvidia</strong>:<ul><li><code>DeviceProperties -&gt; Add -&gt; PCIRoot... -&gt; DeviceID</code></li><li><code>DeviceProperties -&gt; Add -&gt; PCIRoot... -&gt; Family</code></li></ul></li><li><strong>FakeAti</strong>:<ul><li><code>DeviceProperties -&gt; Add -&gt; PCIRoot... -&gt; device-id</code></li><li><code>DeviceProperties -&gt; Add -&gt; PCIRoot... -&gt; ATY,DeviceID</code></li><li><code>DeviceProperties -&gt; Add -&gt; PCIRoot... -&gt; @0,compatible</code></li><li><code>DeviceProperties -&gt; Add -&gt; PCIRoot... -&gt; vendor-id</code></li><li><code>DeviceProperties -&gt; Add -&gt; PCIRoot... -&gt; ATY,VendorID</code></li></ul></li><li><strong>BootDisplay</strong>:<ul><li><code>DeviceProperties -&gt; Add -&gt; PCIRoot... -&gt; @0,AAPL,boot-display</code></li></ul></li></ul><blockquote><p>Intel 核显推荐使用 WhateverGreen 和缓冲帧补丁驱动。</p></blockquote><p>一般的，在注入仿造显卡或仿造 VBIOS 的时候，更推荐使用 <code>SSDT</code> 搭配 WhateverGreen 的方式。至于 EDID 注入，WhateverGreen 的文档中有 <a href="https://github.com/%5Bacidanthera%5D(https://github.com/acidanthera)/WhateverGreen/blob/master/Manual/FAQ.IntelHD.en.md#edid" target="_blank" rel="noopener">详细介绍</a>。</p><h3 id="内核扩展驱动kext相关"><a class="markdownIt-Anchor" href="#内核扩展驱动kext相关"></a> 内核扩展驱动（Kext）相关</h3><ul><li><strong>KernelPm</strong> 和 <strong>AppleIntelCPUPM</strong>：对应 <code>OpenCore</code> 中 <code>Kernel -&gt; Quirks -&gt; AppleXcpmCfgLock -&gt; YES</code> 和 <code>Kernel -&gt; Quirks -&gt; AppleCpuPmCfgLock -&gt; YES</code>。</li><li><strong>DellSMBIOSPatch</strong> ：在 <code>OpenCore</code> 中对应了两个 Quirk：<ul><li><code>Kernel -&gt; Quirks -&gt; CustomSMBIOSGuid -&gt; YES</code></li><li><code>PlatformInfo -&gt; UpdateSMBIOSMode -&gt; Custom</code></li></ul></li><li><strong>Kernel LAPIC</strong> 和 <strong>KernelXCPM</strong>：分别对应 <code>OpenCore</code> 中的 <code>Kernel -&gt; Quirks -&gt; LapicKernelPanic -&gt; YES</code> 和 <code>Kernel -&gt; Quirks -&gt; AppleXcpmExtraMsrs -&gt; YES</code></li><li><strong>AppleRTC</strong>：<ul><li>Comment：Disable RTC checksum update on poweroff</li><li>Enabled：YES</li><li>Count：1</li><li>Base：<code>__ZN8AppleRTC14updateChecksumEv</code></li><li>Identifier：<code>com.apple.driver.AppleRTC</code></li><li>Limit：0</li><li>Find：</li><li>Replace：c3</li></ul></li><li><strong>FakeCPUID</strong>：<code>OpenCore</code> 提供了专门的 Emulate 功能。</li></ul><p>除此以外，一些常用的 Kext Patch 在 <code>OpenCore</code> 中也有了对应了 Quirk。</p><ul><li>解除 USB 15 端口限制，以前根据不同的系统需要打不同的 Kext Patch，现在只需要 <code>OpenCore</code> 一个 Quirk：<code>Kernel -&gt; Quirks -&gt; XhciPortLimit -&gt; YES</code></li><li>内置硬盘变外置硬盘，也只需要一个 Quirk：<code>kernel -&gt; Quirks -&gt; ExternalDiskIcons -&gt; YES</code><ul><li>和前面的 FixSATA 不同，FixSATA 顾名思义只修复 SATA 硬盘，而 <code>OpenCore</code> 这个 Quirks 会修复所有的硬盘。</li></ul></li><li>为 SATA SSD 提供 TRIM 现在也只需要启用一个 Quirk：<code>Kernel -&gt; Quirks -&gt; ThirdPartyDrive</code></li></ul><h3 id="smbios-机型信息和系统参数"><a class="markdownIt-Anchor" href="#smbios-机型信息和系统参数"></a> SMBIOS 机型信息和系统参数</h3><ul><li><strong>Product Name</strong>：<code>PlatformInfo -&gt; Generic -&gt; SystemProductName</code></li><li><strong>Serial Number</strong>：<code>PlatformInfo --&gt; Generic -&gt; SystemSerialNumber</code></li><li><strong>Board Serial Number</strong>：<code>PlatformInfo -&gt; Generic -&gt; MLB</code></li><li><strong>SmUUID</strong>：<code>PlatformInfo -&gt; Generic -&gt; SystemUUID</code></li><li><strong>Slots AAPL Injection</strong>：需要注入到设备属性中<ul><li><code>DeviceProperties -&gt; Add -&gt; PCIRoot... -&gt; APPL,slot-name | string | Add slot</code></li></ul></li><li><strong>CustomUUID</strong>：就连 <code>Clover</code> 都不推荐配置这一项，<code>OpenCore</code> 直接就不提供硬件 UUID 配置功能</li><li><strong>InjectSystemID</strong>：兼容变色龙的历史遗留配置，<code>OpenCore</code> 也不再提供</li><li><strong>BacklightLevel</strong>：需要注入到 NVRAM 中<ul><li><code>NVRAM -&gt; Add -&gt; 7C436110-AB2A-4BBB-A880-FE41995C9F82 -&gt; backlight-level | Data | &lt;Insert value&gt;</code></li></ul></li><li><strong>NvidiaWeb</strong>：需要注入到 NVRAM 中<ul><li><code>NVRAM -&gt; Add -&gt; 7C436110-AB2A-4BBB-A880-FE41995C9F82 -&gt; nvda_drv: &lt;31&gt;</code></li></ul></li></ul><hr><p>配置好 <code>OpenCore</code> 以后，可以将 <code>OpenCore</code> 复制到 U 盘或者硬盘中。需要注意的是，<code>EFI/BOOT/BOOTx64.efi</code> 需要直接替换。在添加引导项时，<code>OpenCore</code> <strong>必须</strong> 从 <code>EFI/BOOT/BOOTx64.efi</code> 启动而不是从 <code>EFI/OC/OpenCore.efi</code> 启动。如果启动项中添加的不是 <code>EFI/BOOT/BOOTx64.efi</code>，那么有很大的概率你会遇到各种奇怪的问题。</p><h2 id="清理-clover-残余"><a class="markdownIt-Anchor" href="#清理-clover-残余"></a> 清理 <code>Clover</code> 残余</h2><p>重启到 <code>OpenCore</code> 引导之前，务必清理掉 <code>Clover</code> 的残留文件：</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line">sudo rm -rf /Library/PreferencePanes/Clover.prefPane <span class="comment"># 删除 `Clover` 位于系统偏好设置中的面板</span></span><br><span class="line"><span class="comment"># 删除 `Clover` 的自动脚本</span></span><br><span class="line">rm -rf <span class="string">"/etc/rc.clover.lib"</span></span><br><span class="line">rm -rf <span class="string">"/etc/rc.boot.d/10.save_and_rotate_boot_log.local"</span></span><br><span class="line">rm -rf <span class="string">"/etc/rc.boot.d/20.mount_ESP.local"</span></span><br><span class="line">rm -rf <span class="string">"/etc/rc.boot.d/70.disable_sleep_proxy_client.local.disabled"</span></span><br><span class="line">rm -rf <span class="string">"/etc/rc.boot.d/80.save_nvram_plist.local"</span></span><br><span class="line">rm -rf <span class="string">"/etc/rc.shutdown.local"</span></span><br><span class="line">rm -rf <span class="string">"/etc/rc.boot.d"</span></span><br><span class="line">rm -rf <span class="string">"/etc/rc.shutdown.d"</span></span><br><span class="line"><span class="comment"># 删除 `Clover` 的守护进程</span></span><br><span class="line">launchctl unload <span class="string">'/Library/LaunchDaemons/com.slice.CloverDaemonNew.plist'</span></span><br><span class="line">rm -rf <span class="string">'/Library/LaunchDaemons/com.slice.CloverDaemonNew.plist'</span></span><br><span class="line">rm -rf <span class="string">'/Library/Application Support/Clover/CloverDaemonNew'</span></span><br><span class="line">rm -rf <span class="string">'/Library/Application Support/Clover/CloverLogOut'</span></span><br><span class="line">rm -rf <span class="string">'/Library/Application Support/Clover/CloverWrapper.sh'</span></span><br></pre></td></tr></table></figure><p>除此以外，还要删除 EFI 分区中的 <code>nvram.plist</code> 文件。</p><p>在 <code>OpenCore</code> 中还需要重置 NVRAM。可以在 <code>OpenCore</code> 引导菜单中，按下空格键显示隐藏条目，最后一个条目就是 <code>OpenCore</code> 的重置 NVRAM 功能。</p><h2 id="原文链接"><a class="markdownIt-Anchor" href="#原文链接"></a> 原文链接：</h2><p><a href="https://blog.skk.moe/post/from-clover-to-opencore/" target="_blank" rel="noopener">https://blog.skk.moe/post/from-clover-to-opencore/</a></p><h2 id="感谢名单"><a class="markdownIt-Anchor" href="#感谢名单"></a> 感谢名单</h2><ul><li><a href="https://www.apple.com/" target="_blank" rel="noopener">Apple</a> 的 macOS</li><li><a href="https://github.com/rehabman" target="_blank" rel="noopener">RehabMan</a>维护的项目：<a href="https://github.com/RehabMan/OS-X-Clover-Laptop-Config" target="_blank" rel="noopener">OS-X-Clover-Laptop-Config</a> <a href="https://github.com/RehabMan/Laptop-DSDT-Patch" target="_blank" rel="noopener">Laptop-DSDT-Patch</a> <a href="https://github.com/RehabMan/OS-X-USB-Inject-All" target="_blank" rel="noopener">OS-X-USB-Inject-All</a>等</li><li><a href="https://github.com/acidanthera" target="_blank" rel="noopener">Acidanthera</a> 维护的项目：<a href="https://github.com/acidanthera/OpenCorePkg" target="_blank" rel="noopener">OpenCorePkg</a> <a href="https://github.com/acidanthera/Lilu" target="_blank" rel="noopener">lilu</a> <a href="https://github.com/acidanthera/AirportBrcmFixup" target="_blank" rel="noopener">AirportBrcmFixup</a> <a href="https://github.com/acidanthera/WhateverGreen" target="_blank" rel="noopener">WhateverGreen</a> <a href="https://github.com/acidanthera/VirtualSMC" target="_blank" rel="noopener">VirtualSMC</a> <a href="https://github.com/acidanthera/AppleALC" target="_blank" rel="noopener">AppleALC</a> <a href="https://github.com/acidanthera/BrcmPatchRAM" target="_blank" rel="noopener">BrcmPatchRAM</a> <a href="https://github.com/acidanthera/MaciASL" target="_blank" rel="noopener">MaciASL</a> 等</li><li><a href="https://www.insanelymac.com/forum/profile/1364628-headkaze/" target="_blank" rel="noopener">headkaze</a> 提供的工具：<a href="https://github.com/headkaze/Hackintool" target="_blank" rel="noopener">hackintool</a> <a href="https://github.com/headkaze/PinConfigurator" target="_blank" rel="noopener">PinConfigurator</a> <a href="https://www.insanelymac.com/forum/topic/339175-brcmpatchram2-for-1015-catalina-broadcom-bluetooth-firmware-upload/" target="_blank" rel="noopener">BrcmPatchRAM</a></li><li><a href="https://github.com/CloverHackyColor" target="_blank" rel="noopener">CloverHackyColor</a>维护的项目：<a href="https://github.com/CloverHackyColor/CloverBootloader" target="_blank" rel="noopener">CloverBootloader</a> <a href="https://github.com/CloverHackyColor/CloverThemes" target="_blank" rel="noopener">CloverThemes</a></li><li>宪武整理的：<a href="https://github.com/daliansky/P-little" target="_blank" rel="noopener">P-little</a> <a href="https://github.com/daliansky/OC-little" target="_blank" rel="noopener">OC-little</a></li><li><a href="https://github.com/chris1111" target="_blank" rel="noopener">chris1111</a>维护的项目：<a href="https://github.com/chris1111/VoodooHDA-2.9.2-Clover-V15" target="_blank" rel="noopener">VoodooHDA</a> <a href="https://github.com/chris1111/Wireless-USB-Adapter-Clover" target="_blank" rel="noopener">Wireless USB Adapter Clover</a></li><li><a href="https://github.com/zxystd" target="_blank" rel="noopener">zxystd</a>开发的<a href="https://github.com/zxystd/itlwm" target="_blank" rel="noopener">itlwm</a> <a href="https://github.com/zxystd/IntelBluetoothFirmware" target="_blank" rel="noopener">IntelBluetoothFirmware</a></li><li><a href="https://github.com/lihaoyun6" target="_blank" rel="noopener">lihaoyun6</a>提供的工具：<a href="https://github.com/lihaoyun6/CPU-S" target="_blank" rel="noopener">CPU-S</a> <a href="https://github.com/lihaoyun6/macOS-Displays-icon" target="_blank" rel="noopener">macOS-Displays-icon</a> <a href="https://github.com/lihaoyun6/SidecarPatcher" target="_blank" rel="noopener">SidecarPatcher</a></li><li><a href="https://github.com/SukkaW" target="_blank" rel="noopener">sukka</a>更新维护的<a href="https://blog.skk.moe/post/from-clover-to-opencore/" target="_blank" rel="noopener">从 Clover 到 OpenCore —— Clover 迁移 OpenCore 指南</a></li><li><a href="https://github.com/xzhih" target="_blank" rel="noopener">xzhih</a>提供的工具：<a href="https://github.com/xzhih/one-key-hidpi" target="_blank" rel="noopener">one-key-hidpi</a></li><li><a href="https://github.com/williambj1" target="_blank" rel="noopener">Bat.bat</a>更新维护的<a href="https://blog.daliansky.net/OpenCore-BootLoader.html">精解OpenCore</a></li><li><a href="https://github.com/shuiyunxc" target="_blank" rel="noopener">shuiyunxc</a> 更新维护的<a href="https://shuiyunxc.gitee.io/2020/04/06/Faults/index/" target="_blank" rel="noopener">OpenCore配置错误、故障与解决办法</a></li><li><a href="https://github.com/athlonreg" target="_blank" rel="noopener">athlonreg</a>更新维护的<a href="https://blog.cloudops.ml/ocbook/" target="_blank" rel="noopener">OpenCore 0.5+ 部件补丁</a> <a href="https://github.com/athlonreg/Common-patches-for-hackintosh" target="_blank" rel="noopener">Common-patches-for-hackintosh</a></li><li><a href="github.com">github.com</a></li><li><a href="gitee.io">码云 gitee.io</a></li><li><a href="coding.net">扣钉 coding.net</a></li></ul><h2 id="参考及引用"><a class="markdownIt-Anchor" href="#参考及引用"></a> 参考及引用：</h2><ul><li><a href="https://deviwiki.com/wiki/Dell" target="_blank" rel="noopener">https://deviwiki.com/wiki/Dell</a></li><li><a href="https://deviwiki.com/wiki/Dell_Wireless_1820A_(DW1820A)" target="_blank" rel="noopener">https://deviwiki.com/wiki/Dell_Wireless_1820A_(DW1820A)</a></li><li><a href="%5Bhttps://osxlatitude.com/profile/4953-herv%C3%A9/%5D(https://osxlatitude.com/profile/4953-herv%C3%A9/)">Hervé</a> 更新的Broadcom 4350:<a href="https://osxlatitude.com/forums/topic/12169-bcm4350-cards-registry-of-cardslaptops-interop/" target="_blank" rel="noopener">https://osxlatitude.com/forums/topic/12169-bcm4350-cards-registry-of-cardslaptops-interop/</a></li><li><a href="%5Bhttps://osxlatitude.com/profile/4953-herv%C3%A9/%5D(https://osxlatitude.com/profile/4953-herv%C3%A9/)">Hervé</a> 更新的DW1820A支持机型列表:<a href="https://osxlatitude.com/forums/topic/11322-broadcom-bcm4350-cards-under-high-sierramojave/" target="_blank" rel="noopener">https://osxlatitude.com/forums/topic/11322-broadcom-bcm4350-cards-under-high-sierramojave/</a></li><li><a href="https://osxlatitude.com/profile/129953-nickhx/" target="_blank" rel="noopener">nickhx</a> 提供的蓝牙驱动：<a href="https://osxlatitude.com/forums/topic/11540-dw1820a-for-7490-help/?do=findComment&amp;comment=92833" target="_blank" rel="noopener">https://osxlatitude.com/forums/topic/11540-dw1820a-for-7490-help/?do=findComment&amp;comment=92833</a></li><li><a href="https://blog.xjn819.com/" target="_blank" rel="noopener">xjn819</a>： <a href="https://blog.xjn819.com/?p=543" target="_blank" rel="noopener">使用OpenCore引导黑苹果</a> <a href="https://blog.xjn819.com/?p=317" target="_blank" rel="noopener">300系列主板正确使用AptioMemoryFix.efi的姿势(重写版）</a></li><li><a href="https://www.insanelymac.com/" target="_blank" rel="noopener">insanelymac.com</a></li><li><a href="https://www.tonymacx86.com/" target="_blank" rel="noopener">tonymacx86.com</a></li><li><a href="http://bbs.pcbeta.com" target="_blank" rel="noopener">远景论坛</a></li><li><a href="https://applelife.ru/" target="_blank" rel="noopener">applelife.ru</a></li><li><a href="https://www.olarila.com/" target="_blank" rel="noopener">olarila.com</a></li></ul></div><div><div id="wechat_subscriber" style="display:block;padding:10px 0;margin:20px auto;width:100%;text-align:center"><a href="https://hackintosher.taobao.com"><img id="wechat_subscriber_qcode" src="/uploads/WeChatandShop.png" alt="黑果小兵 wechat" style="max-width:90%"></a><div>微信扫一扫，订阅/直达【黑果小兵的部落阁】</div></div></div><div class="updated"><svg xmlns="http://www.w3.org/2000/svg" width="130" height="20"><lineargradient id="b" x2="0" y2="100%"><stop offset="0" stop-color="#bbb" stop-opacity=".1"/><stop offset="1" stop-opacity=".1"/></lineargradient><clippath id="a"><rect width="130" height="20" rx="3" fill="#fff"/></clippath><g clip-path="url(#a)"><path fill="#555" d="M0 0h55v20H0z"/><path fill="#97CA00" d="M55 0h75v20H55z"/><path fill="url(#b)" d="M0 0h130v20H0z"/></g><g fill="#fff" text-anchor="middle" font-family="Menlo,monospace" font-size="110"><text x="285" y="150" fill="#010101" fill-opacity=".3" textlength="450" transform="scale(.1)">更新日期</text><text x="285" y="140" textlength="450" transform="scale(.1)">更新日期</text><text x="915" y="150" fill="#010101" fill-opacity=".3" textlength="650" transform="scale(.1)">2022-11-10</text><text x="915" y="140" textlength="650" transform="scale(.1)">2022-11-10</text></g></svg></div><div><div><div style="text-align:center;color:#ccc;font-size:14px">-------------本文结束<i class="fa fa-apple"></i>感谢您的阅读-------------</div></div></div><div><div style="padding:10px 0;margin:20px auto;width:90%;text-align:center"><button id="rewardButton" disable="enable" onclick='var qr=document.getElementById("QR");"none"===qr.style.display?qr.style.display="block":qr.style.display="none"'><span>打赏</span></button><div>如果文章对您有帮助，就请站长喝杯咖啡吧 ´◡`</div><div id="QR" style="display:none"><div id="wechat" style="display:inline-block"><img id="wechat_qr" src="/images/wechatpay.jpg" alt="黑果小兵 微信支付"><p>微信支付</p></div><div id="alipay" style="display:inline-block"><img id="alipay_qr" src="/images/alipay.jpg" alt="黑果小兵 支付宝"><p>支付宝</p></div></div></div></div><div><div><ul class="qq-qun"><div><p></p><h2>QQ群列表：</h2><p></p><p>630724380 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=JyGkfKK7U3Xq3TDtpqKOTq_gW7SBg4Uh&jump_from=webapi" target="_blank" rel="noopener">黑果小兵黑苹果技术群7</a> 2000人 新开群<br>713810838 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=e8E-1Ge2lCoBSTlj8Y4zMxX7l7-V63Iv&jump_from=webapi" target="_blank" rel="noopener">黑果小兵黑苹果技术群8</a> 2000人 新开群<br>688324116 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=Fp4HZ5e8A61oCu0GMS5YUqP6COc43-AO&jump_from=webapi" target="_blank" rel="noopener">一起黑苹果</a> 2000人<br>331686786 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=No8zvDfvDicT-GfSApw1RMBI-3MQ7zM3&jump_from=webapi" target="_blank" rel="noopener">一起吃苹果</a> 2000人<br>257995340 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=acztqL9efoqAOoptc_3moZ9b3Sgczu9_&jump_from=webapi" target="_blank" rel="noopener">一起啃苹果</a> 2000人群 远景报备群<br>875482673 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=aZNyoRum_er2mruqmnbX_93ncHNgsyak&jump_from=webapi" target="_blank" rel="noopener">黑果小兵黑苹果技术群</a> 2000人<br>1058822256 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=1sIT0BDaejgr9t1Hlw16cMnw_Z96zleV&jump_from=webapi" target="_blank" rel="noopener">黑果小兵黑苹果技术群2</a> 2000人<br>819662911 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=aJx9xO7vAmyslCuOdK0bRMmDLpvOCeRw&jump_from=webapi" target="_blank" rel="noopener">黑果小兵黑苹果技术群3</a> 2000人<br>954098809 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=iu042k0X5snr--dzAxOzcsvD9Zft9yx7&jump_from=webapi" target="_blank" rel="noopener">黑果小兵黑苹果技术群4</a> 2000人<br>1161377948 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=kBV9vCnz-NqtXXJiwnUhaLyJN1D7G0n6&jump_from=webapi" target="_blank" rel="noopener">黑果小兵黑苹果技术群5</a> 2000人<br>553283949 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=kr_hZc5pKK4TCDRaFPwRlfAiB4528InP&jump_from=webapi" target="_blank" rel="noopener">黑果小兵黑苹果技术群6</a> 2000人<br>701278330 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=x57TlUmxz88oXGDWjMOOsWokYi8klE11&jump_from=webapi" target="_blank" rel="noopener">黑苹果无线网卡交流群</a> 1000人群 DW1820A技术支持群<br>891434070 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=TUAxSUUtw_T1N62V0kF1sWvMcDr_eoxc&jump_from=webapi" target="_blank" rel="noopener">Catalina黑苹果交流群</a> 2000人群 远景报备群<br>939122730 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=g_rpf7m0LJllE6WHY9c0gVvCTBm1MtuN&jump_from=webapi" target="_blank" rel="noopener">Catalina黑苹果交流II群</a> 2000人群<br>891677227 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=xsuIOzF7RXYaRTTbJ5o_UjzohRDUx5UY&jump_from=webapi" target="_blank" rel="noopener">黑果小兵高级群</a> 2000人群<br>943307869 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=aoSvqrbysdjPo0Wa_XvvPuMG9NMEtOie&jump_from=webapi" target="_blank" rel="noopener">黑果小兵高级群II</a> 2000人群<br>419298796 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=4gWtT2-pOWZYIGwIpVaTNft2aOJP-5qs&jump_from=webapi" target="_blank" rel="noopener">零刻黑苹果技术交流群</a> 500人群 非专用机型请勿加入<br>275356796 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=H7hFwiVkZq71L7se6rz3hE9QcacqL-dV&jump_from=webapi" target="_blank" rel="noopener">morefine黑苹果技术交流群</a> 500人群 非专用机型请勿加入<br>869792897 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=MTDHb2QgLH3gkaymtdFCpk77J5ufWJpH&jump_from=webapi" target="_blank" rel="noopener">minisforum U820黑苹果技术群</a> 500人群 非专用机型请勿加入<br>942112153 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=N5cjw5ksrnmk-RMQ4fPCOo5D_Dxiu47B&jump_from=webapi" target="_blank" rel="noopener">天逸510s Mini黑苹果交流群</a> 1000人群 非专用机型请勿加入<br>673294583 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=GgcMJM5-98yB-fc6zyGcTI3OuesrSBRk&jump_from=webapi" target="_blank" rel="noopener">小新Pro黑苹果技术群</a> 2000人群 非专用机型请勿加入<br>946132482 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=r-m99xC-BPIRdVkEjU6duvqXMJ-1FOwA&jump_from=webapi" target="_blank" rel="noopener">小新Pro黑苹果</a> 500人群 非专用机型请勿加入<br>158976808 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=c9DeeyUg9x4dZlOpIVmj4R4g38p-YCZ1&jump_from=webapi" target="_blank" rel="noopener">DELL黑苹果交流群</a> 1000人群 非专用机型请勿加入<br>247451054 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=h7fvRnWmdaMK2D0qVQLzJsjCC9PwB5h3&jump_from=webapi" target="_blank" rel="noopener">小米Pro黑苹果高级群</a> 2000人群 非专用机型请勿加入<br>943181023 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=OGO_GSX9ZhtbQ_HNns57Vdxm5pR1wH6V&jump_from=webapi" target="_blank" rel="noopener">联想小新Air黑苹果交流群</a> 500人群 非专用机型请勿加入<br></p><p></p><h2>Telegram群：</h2><p></p><p>黑果小兵的部落阁 <a href="http://t.me/daliansky" target="_blank">http://t.me/daliansky</a><br>黑果小兵的部落阁 #安装问题讨论 <a href="https://t.me/Hackintosh_Installer" target="_blank">https://t.me/Hackintosh_Installer</a></p><p></p><h2>淘宝店铺：</h2><p></p><p>黑果小兵的部落阁 <a href="https://hackintosher.taobao.com" target="_blank">https://hackintosher.taobao.com</a></p></div></ul></div></div><div><ul class="post-copyright"><li class="post-copyright-author"><strong>本文作者： </strong>黑果小兵</li><li class="post-copyright-link"><strong>本文链接：</strong> <a href="https://blog.daliansky.net/From-Clover-To-OpenCore.html" title="【转载】从Clover到OpenCore">https://blog.daliansky.net/From-Clover-To-OpenCore.html</a></li><li class="post-copyright-license"><strong>版权声明： </strong>本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" rel="noopener" target="_blank"><i class="fa fa-fw fa-creative-commons"></i>BY-NC-SA</a> 许可协议。转载请注明出处！</li></ul></div><footer class="post-footer"><div class="post-tags"><a href="/tags/教程/" rel="tag"><i class="fa fa-tag"></i> 教程</a> <a href="/tags/OpenCore/" rel="tag"><i class="fa fa-tag"></i> OpenCore</a> <a href="/tags/Clover/" rel="tag"><i class="fa fa-tag"></i> Clover</a> <a href="/tags/OC-little/" rel="tag"><i class="fa fa-tag"></i> OC-little</a> <a href="/tags/bootloader/" rel="tag"><i class="fa fa-tag"></i> bootloader</a></div><div class="post-nav"><div class="post-nav-next post-nav-item"><a href="/macOS-Catalina-10.15.4-19E266-Release-version-with-Clover-5107-original-image-Double-EFI-Version-UEFI-and-MBR.html" rel="next" title="【黑果小兵】macOS Catalina 10.15.4 19E2269 正式版 with Clover 5116原版镜像[双EFI版][UEFI and MBR]"><i class="fa fa-chevron-left"></i> 【黑果小兵】macOS Catalina 10.15.4 19E2269 正式版 with Clover 5116原版镜像[双EFI版][UEFI and MBR]</a></div><span class="post-nav-divider"></span><div class="post-nav-prev post-nav-item"><a href="/WeChat_First-macOS-Catalina-10.15.4-19E2269-official-version-Clover-5116-original-image-reconstruction-version.html" rel="prev" title="【黑果小兵】【微信首发】macOS Catalina 10.15.4 19E2269 正式版 Clover 5116原版镜像重构版">【黑果小兵】【微信首发】macOS Catalina 10.15.4 19E2269 正式版 Clover 5116原版镜像重构版 <i class="fa fa-chevron-right"></i></a></div></div></footer></div></article></div></div><div id="gitalk-container"></div></div><div class="sidebar-toggle"><div class="sidebar-toggle-line-wrap"><span class="sidebar-toggle-line sidebar-toggle-line-first"></span> <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span> <span class="sidebar-toggle-line sidebar-toggle-line-last"></span></div></div><aside id="sidebar" class="sidebar"><div id="sidebar-dimmer"></div><div class="sidebar-inner"><ul class="sidebar-nav motion-element"><li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">文章目录</li><li class="sidebar-nav-overview" data-target="site-overview-wrap">站点概览</li></ul><div class="site-overview-wrap sidebar-panel"><div class="site-overview"><div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person"><a href="/"><img class="site-author-image" itemprop="image" src="/images/avatar.png" alt="黑果小兵"></a><p class="site-author-name" itemprop="name">黑果小兵</p><p class="site-description motion-element" itemprop="description">黑果小兵</p></div><nav class="site-state motion-element"><div class="site-state-item site-state-posts"><a href="/archives/"><span class="site-state-item-count">122</span> <span class="site-state-item-name">日志</span></a></div><div class="site-state-item site-state-categories"><a href="/categories/index.html"><span class="site-state-item-count">26</span> <span class="site-state-item-name">分类</span></a></div><div class="site-state-item site-state-tags"><a href="/tags/index.html"><span class="site-state-item-count">275</span> <span class="site-state-item-name">标签</span></a></div></nav><div class="feed-link motion-element"><a href="/atom.xml" rel="alternate"><i class="fa fa-rss"></i> RSS</a></div><div class="links-of-author motion-element"><span class="links-of-author-item"><a href="https://github.com/daliansky" title="GitHub &rarr; https://github.com/daliansky" rel="noopener" target="_blank"><i class="fa fa-fw fa-github"></i></a> </span><span class="links-of-author-item"><a href="http://www.jianshu.com/u/df9143008845" title="简书 &rarr; http://www.jianshu.com/u/df9143008845" rel="noopener" target="_blank"><i class="fa fa-fw fa-heartbeat"></i></a> </span><span class="links-of-author-item"><a href="http://shang.qq.com/wpa/qunwpa?idkey=db511a29e856f37cbb871108ffa77a6e79dde47e491b8f2c8d8fe4d3c310de91" title="QQ &rarr; http://shang.qq.com/wpa/qunwpa?idkey=db511a29e856f37cbb871108ffa77a6e79dde47e491b8f2c8d8fe4d3c310de91" rel="noopener" target="_blank"><i class="fa fa-fw fa-qq"></i></a></span></div><div class="links-of-blogroll motion-element links-of-blogroll-block"><div class="links-of-blogroll-title"><i class="fa fa-fw fa-link"></i> Links</div><ul class="links-of-blogroll-list"><li class="links-of-blogroll-item"><a href="https://blog.tlhub.cn" title="https://blog.tlhub.cn" rel="noopener" target="_blank">Athlonreg</a></li><li class="links-of-blogroll-item"><a href="http://www.sqlsec.com" title="http://www.sqlsec.com" rel="noopener" target="_blank">国光</a></li></ul></div></div></div><div class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active"><div class="post-toc"><div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-2"><a class="nav-link" href="#序言以外应该写在最前面的话"><span class="nav-number">1.</span> <span class="nav-text">序言以外应该写在最前面的话</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#修改-ssdt-dsdt-以搭配-opencore"><span class="nav-number">2.</span> <span class="nav-text">修改 SSDT / DSDT 以搭配 OpenCore</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#减少不必要的-dsdt-重命名"><span class="nav-number">3.</span> <span class="nav-text">减少不必要的 DSDT 重命名</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#摆脱对-clover-acpi-quirks-的依赖"><span class="nav-number">4.</span> <span class="nav-text">摆脱对 Clover ACPI Quirks 的依赖</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#更新设备属性"><span class="nav-number">5.</span> <span class="nav-text">更新设备属性</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#使用缓冲帧补丁驱动-intel-核显"><span class="nav-number">5.1.</span> <span class="nav-text">使用缓冲帧补丁驱动 Intel 核显</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#新的声卡-layout-id-注入方式"><span class="nav-number">5.2.</span> <span class="nav-text">新的声卡 layout-id 注入方式</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#开始组织-opencore-目录"><span class="nav-number">6.</span> <span class="nav-text">开始组织 OpenCore 目录</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#下载-opencore-所需文件"><span class="nav-number">6.1.</span> <span class="nav-text">下载 OpenCore 所需文件</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#决定你使用的配置文件编辑器"><span class="nav-number">6.2.</span> <span class="nav-text">决定你使用的配置文件编辑器</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#生成目录结构"><span class="nav-number">6.3.</span> <span class="nav-text">生成目录结构</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#删除不需要的文件"><span class="nav-number">6.4.</span> <span class="nav-text">删除不需要的文件</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#开始配置-opencore"><span class="nav-number">7.</span> <span class="nav-text">开始配置 OpenCore</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#clover-中的设置在-opencore-的等效配置"><span class="nav-number">8.</span> <span class="nav-text">Clover 中的设置在 OpenCore 的等效配置</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#boot-的相关设置"><span class="nav-number">8.1.</span> <span class="nav-text">Boot 的相关设置</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#cpu-相关配置"><span class="nav-number">8.2.</span> <span class="nav-text">CPU 相关配置</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#设备属性相关设置"><span class="nav-number">8.3.</span> <span class="nav-text">设备属性相关设置</span></a><ol class="nav-child"><li class="nav-item nav-level-4"><a class="nav-link" href="#usb"><span class="nav-number">8.3.1.</span> <span class="nav-text">USB</span></a></li><li class="nav-item nav-level-4"><a class="nav-link" href="#fakeid"><span class="nav-number">8.3.2.</span> <span class="nav-text">FakeID</span></a></li></ol></li><li class="nav-item nav-level-3"><a class="nav-link" href="#clover-中相关的图形设置"><span class="nav-number">8.4.</span> <span class="nav-text">Clover 中相关的图形设置</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#内核扩展驱动kext相关"><span class="nav-number">8.5.</span> <span class="nav-text">内核扩展驱动（Kext）相关</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#smbios-机型信息和系统参数"><span class="nav-number">8.6.</span> <span class="nav-text">SMBIOS 机型信息和系统参数</span></a></li></ol></li><li class="nav-item nav-level-2"><a class="nav-link" href="#清理-clover-残余"><span class="nav-number">9.</span> <span class="nav-text">清理 Clover 残余</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#原文链接"><span class="nav-number">10.</span> <span class="nav-text">原文链接：</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#感谢名单"><span class="nav-number">11.</span> <span class="nav-text">感谢名单</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#参考及引用"><span class="nav-number">12.</span> <span class="nav-text">参考及引用：</span></a></li></ol></div></div></div></div></aside></div></main><footer id="footer" class="footer"><div class="footer-inner"><div class="copyright"><a href="http://www.beian.miit.gov.cn" rel="noopener" target="_blank">辽ICP备15000696号-3 </a>&copy; 2016 – <span itemprop="copyrightYear">2022</span> <span class="with-love" id="animate"><i class="fa fa-apple"></i> </span><span class="author" itemprop="copyrightHolder">黑果小兵</span> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"><i class="fa fa-area-chart"></i> </span><span title="站点总字数">835k</span> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"><i class="fa fa-coffee"></i> </span><span title="站点阅读时长">25:19</span></div><div class="busuanzi-count"><script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script><span class="site-uv" title="总访客量"><i class="fa fa-user"></i> <span class="busuanzi-value" id="busuanzi_value_site_uv"></span> </span><span class="site-pv" title="总访问量"><i class="fa fa-eye"></i> <span class="busuanzi-value" id="busuanzi_value_site_pv"></span></span></div></div></footer><div class="back-to-top"><i class="fa fa-arrow-up"></i> <span id="scrollpercent"><span>0</span>%</span></div></div><script>"[object Function]"!==Object.prototype.toString.call(window.Promise)&&(window.Promise=null)</script><script src="/lib/jquery/index.js?v=2.1.3"></script><script src="/lib/velocity/velocity.min.js?v=1.2.1"></script><script src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script><script src="https://fastly.jsdelivr.net/npm/@fancyapps/fancybox@3.2.5/dist/jquery.fancybox.min.js"></script><script src="//fastly.jsdelivr.net/gh/theme-next/theme-next-reading-progress@1.1/reading_progress.min.js"></script><script src="/js/src/utils.js?v=6.6.0"></script><script src="/js/src/motion.js?v=6.6.0"></script><script src="/js/src/scrollspy.js?v=6.6.0"></script><script src="/js/src/post-details.js?v=6.6.0"></script><script src="/js/src/bootstrap.js?v=6.6.0"></script><script src="//fastly.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.min.js"></script><link rel="stylesheet" href="//fastly.jsdelivr.net/npm/gitalk@1.7.2/dist/gitalk.css"><script src="//fastly.jsdelivr.net/npm/js-md5@0.7.3/src/md5.min.js"></script><script>var gitalk=new Gitalk({clientID:"0da3e792a21a77938da6",clientSecret:"4d2869563000629ee6dbed48fbbf878aea151cb6",repo:"daliansky.github.io",owner:"daliansky",admin:["daliansky"],id:md5(location.pathname),distractionFreeMode:"true",proxy:"https://gitalk.daliansky.workers.dev/?https://github.com/login/oauth/access_token"});gitalk.render("gitalk-container")</script><script>// Popup Window;
    var isfetched = false;
    var isXml = true;
    // Search DB path;
    var search_path = "search.xml";
    if (search_path.length === 0) {
      search_path = "search.xml";
    } else if (/json$/i.test(search_path)) {
      isXml = false;
    }
    var path = "/" + search_path;
    // monitor main search box;

    var onPopupClose = function (e) {
      $('.popup').hide();
      $('#local-search-input').val('');
      $('.search-result-list').remove();
      $('#no-result').remove();
      $(".local-search-pop-overlay").remove();
      $('body').css('overflow', '');
    }

    function proceedsearch() {
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay"></div>')
        .css('overflow', 'hidden');
      $('.search-popup-overlay').click(onPopupClose);
      $('.popup').toggle();
      var $localSearchInput = $('#local-search-input');
      $localSearchInput.attr("autocapitalize", "none");
      $localSearchInput.attr("autocorrect", "off");
      $localSearchInput.focus();
    }

    // search function;
    var searchFunc = function(path, search_id, content_id) {
      'use strict';

      // start loading animation
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay">' +
          '<div id="search-loading-icon">' +
          '<i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>' +
          '</div>' +
          '</div>')
        .css('overflow', 'hidden');
      $("#search-loading-icon").css('margin', '20% auto 0 auto').css('text-align', 'center');

      

      $.ajax({
        url: path,
        dataType: isXml ? "xml" : "json",
        async: true,
        success: function(res) {
          // get the contents from search data
          isfetched = true;
          $('.popup').detach().appendTo('.header-inner');
          var datas = isXml ? $("entry", res).map(function() {
            return {
              title: $("title", this).text(),
              content: $("content",this).text(),
              url: $("url" , this).text()
            };
          }).get() : res;
          var input = document.getElementById(search_id);
          var resultContent = document.getElementById(content_id);
          var inputEventFunction = function() {
            var searchText = input.value.trim().toLowerCase();
            var keywords = searchText.split(/[\s\-]+/);
            if (keywords.length > 1) {
              keywords.push(searchText);
            }
            var resultItems = [];
            if (searchText.length > 0) {
              // perform local searching
              datas.forEach(function(data) {
                var isMatch = false;
                var hitCount = 0;
                var searchTextCount = 0;
                var title = data.title.trim();
                var titleInLowerCase = title.toLowerCase();
                var content = data.content.trim().replace(/<[^>]+>/g,"");
                
                var contentInLowerCase = content.toLowerCase();
                var articleUrl = decodeURIComponent(data.url);
                var indexOfTitle = [];
                var indexOfContent = [];
                // only match articles with not empty titles
                if(title != '') {
                  keywords.forEach(function(keyword) {
                    function getIndexByWord(word, text, caseSensitive) {
                      var wordLen = word.length;
                      if (wordLen === 0) {
                        return [];
                      }
                      var startPosition = 0, position = [], index = [];
                      if (!caseSensitive) {
                        text = text.toLowerCase();
                        word = word.toLowerCase();
                      }
                      while ((position = text.indexOf(word, startPosition)) > -1) {
                        index.push({position: position, word: word});
                        startPosition = position + wordLen;
                      }
                      return index;
                    }

                    indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false));
                    indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false));
                  });
                  if (indexOfTitle.length > 0 || indexOfContent.length > 0) {
                    isMatch = true;
                    hitCount = indexOfTitle.length + indexOfContent.length;
                  }
                }

                // show search results

                if (isMatch) {
                  // sort index by position of keyword

                  [indexOfTitle, indexOfContent].forEach(function (index) {
                    index.sort(function (itemLeft, itemRight) {
                      if (itemRight.position !== itemLeft.position) {
                        return itemRight.position - itemLeft.position;
                      } else {
                        return itemLeft.word.length - itemRight.word.length;
                      }
                    });
                  });

                  // merge hits into slices

                  function mergeIntoSlice(text, start, end, index) {
                    var item = index[index.length - 1];
                    var position = item.position;
                    var word = item.word;
                    var hits = [];
                    var searchTextCountInSlice = 0;
                    while (position + word.length <= end && index.length != 0) {
                      if (word === searchText) {
                        searchTextCountInSlice++;
                      }
                      hits.push({position: position, length: word.length});
                      var wordEnd = position + word.length;

                      // move to next position of hit

                      index.pop();
                      while (index.length != 0) {
                        item = index[index.length - 1];
                        position = item.position;
                        word = item.word;
                        if (wordEnd > position) {
                          index.pop();
                        } else {
                          break;
                        }
                      }
                    }
                    searchTextCount += searchTextCountInSlice;
                    return {
                      hits: hits,
                      start: start,
                      end: end,
                      searchTextCount: searchTextCountInSlice
                    };
                  }

                  var slicesOfTitle = [];
                  if (indexOfTitle.length != 0) {
                    slicesOfTitle.push(mergeIntoSlice(title, 0, title.length, indexOfTitle));
                  }

                  var slicesOfContent = [];
                  while (indexOfContent.length != 0) {
                    var item = indexOfContent[indexOfContent.length - 1];
                    var position = item.position;
                    var word = item.word;
                    // cut out 100 characters
                    var start = position - 20;
                    var end = position + 80;
                    if(start < 0){
                      start = 0;
                    }
                    if (end < position + word.length) {
                      end = position + word.length;
                    }
                    if(end > content.length){
                      end = content.length;
                    }
                    slicesOfContent.push(mergeIntoSlice(content, start, end, indexOfContent));
                  }

                  // sort slices in content by search text's count and hits' count

                  slicesOfContent.sort(function (sliceLeft, sliceRight) {
                    if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) {
                      return sliceRight.searchTextCount - sliceLeft.searchTextCount;
                    } else if (sliceLeft.hits.length !== sliceRight.hits.length) {
                      return sliceRight.hits.length - sliceLeft.hits.length;
                    } else {
                      return sliceLeft.start - sliceRight.start;
                    }
                  });

                  // select top N slices in content

                  var upperBound = parseInt('1');
                  if (upperBound >= 0) {
                    slicesOfContent = slicesOfContent.slice(0, upperBound);
                  }

                  // highlight title and content

                  function highlightKeyword(text, slice) {
                    var result = '';
                    var prevEnd = slice.start;
                    slice.hits.forEach(function (hit) {
                      result += text.substring(prevEnd, hit.position);
                      var end = hit.position + hit.length;
                      result += '<b class="search-keyword">' + text.substring(hit.position, end) + '</b>';
                      prevEnd = end;
                    });
                    result += text.substring(prevEnd, slice.end);
                    return result;
                  }

                  var resultItem = '';

                  if (slicesOfTitle.length != 0) {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</a>";
                  } else {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + title + "</a>";
                  }

                  slicesOfContent.forEach(function (slice) {
                    resultItem += "<a href='" + articleUrl + "'>" +
                      "<p class=\"search-result\">" + highlightKeyword(content, slice) +
                      "...</p>" + "</a>";
                  });

                  resultItem += "</li>";
                  resultItems.push({
                    item: resultItem,
                    searchTextCount: searchTextCount,
                    hitCount: hitCount,
                    id: resultItems.length
                  });
                }
              })
            };
            if (keywords.length === 1 && keywords[0] === "") {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>'
            } else if (resultItems.length === 0) {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>'
            } else {
              resultItems.sort(function (resultLeft, resultRight) {
                if (resultLeft.searchTextCount !== resultRight.searchTextCount) {
                  return resultRight.searchTextCount - resultLeft.searchTextCount;
                } else if (resultLeft.hitCount !== resultRight.hitCount) {
                  return resultRight.hitCount - resultLeft.hitCount;
                } else {
                  return resultRight.id - resultLeft.id;
                }
              });
              var searchResultList = '<ul class=\"search-result-list\">';
              resultItems.forEach(function (result) {
                searchResultList += result.item;
              })
              searchResultList += "</ul>";
              resultContent.innerHTML = searchResultList;
            }
          }

          if ('auto' === 'auto') {
            input.addEventListener('input', inputEventFunction);
          } else {
            $('.search-icon').click(inputEventFunction);
            input.addEventListener('keypress', function (event) {
              if (event.keyCode === 13) {
                inputEventFunction();
              }
            });
          }

          // remove loading animation
          $(".local-search-pop-overlay").remove();
          $('body').css('overflow', '');

          proceedsearch();
        }
      });
    }

    // handle and trigger popup window;
    $('.popup-trigger').click(function(e) {
      e.stopPropagation();
      if (isfetched === false) {
        searchFunc(path, 'local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });

    $('.popup-btn-close').click(onPopupClose);
    $('.popup').click(function(e){
      e.stopPropagation();
    });
    $(document).on('keyup', function (event) {
      var shouldDismissSearchPopup = event.which === 27 &&
        $('.search-popup').is(':visible');
      if (shouldDismissSearchPopup) {
        onPopupClose();
      }
    });</script><script src="/js/src/js.cookie.js?v=6.6.0"></script><script src="/js/src/scroll-cookie.js?v=6.6.0"></script><script src="/live2dw/lib/L2Dwidget.min.js?094cbace49a39548bed64abff5988b05"></script><script>L2Dwidget.init({pluginRootPath:"live2dw/",pluginJsPath:"lib/",pluginModelPath:"assets/",model:{scale:1.2,hHeadPos:.5,vHeadPos:.618,jsonPath:"/live2dw/assets/tororo.model.json"},display:{superSample:2,width:150,height:300,position:"right",hOffset:0,vOffset:-20},mobile:{show:!1,scale:.5},react:{opacityDefault:.7,opacityOnHover:.2},log:!1,tagMode:!1})</script></body></html>